Git使用中,如果遇到某一次的提交不满意,可以使用如下方法修改
# git rebase -i HEAD~3 >>> HEAD~3表示列出最近三次的
之后会出现
1 pick 6e1bb94 modify
2 pick 1769e78 delete
3 pick 7ce9cad delete
4
5 # Rebase 491ed3f..7ce9cad onto 491ed3f
6 #
7 # Commands:
8 # p, pick = use commit
9 # r, reword = use commit, but edit the commit message
10 # e, edit = use commit, but stop for amending
11 # s, squash = use commit, but meld into previous commit
12 # f, fixup = like "squash", but discard this commit's log message
13 # x, exec = run command (the rest of the line) using shell
14 #
15 # These lines can be re-ordered; they are executed from top to bottom.
16 #
17 # If you remove a line here THAT COMMIT WILL BE LOST.
18 # However, if you remove