Please see this page.
http://schacon.github.com/history.html
I tried this and summary the step as following.
1. git rebase -i HEAD~3
2. change the "pick" to "edit" for the commit you want.
3. change the code , and git add
4. git commit --amend, change the comment you want
5. git rebase --continue
BYW, during once, my git tree is corrupted.
http://schacon.github.com/history.html
I tried this and summary the step as following.
1. git rebase -i HEAD~3
2. change the "pick" to "edit" for the commit you want.
3. change the code , and git add
4. git commit --amend, change the comment you want
5. git rebase --continue
BYW, during once, my git tree is corrupted.
It is better for you to make a copy of your git tree first.
这个写的比较详细。
http://gitbook.liuhui998.com/4_3.html