Use "git rebase -i", here is how:
http://git-scm.com/book/en/Git-Tools-Rewriting-History