git add ./
git commit -m"oooooooo"
git rebase -i HEAD~2 (索引从1开始,同理若更改前n次的commit,此处改为n即可)
显示如下:
pick 238fedf balabala。
pick 941fb81 oooooooo
# Rebase 3c79056..941fb81 onto 3c79056
#
# Commands:
# p, pick = use commit
# r, reword = use commit, but edit the commit message
# e, edit = use commit, but stop for amending
# s, squash = use commit, but meld into previous commit
# f, fixup = like "squash", but discard this commit's log message
# x, exec = run command (the rest of the line) using shell
#
# If you remove a line here THAT COMMIT WILL BE LOST.
# However, if you remove everything, the rebase will be aborted.