# 展示所有提交记录
git log
# 需要合并的提交中最早的提交的前一个id
git rebase -i {COMMIT-ID}
pick d01a3ec Update Dockerfile
pick f54b5a4 Update Dockerfile
pick 493e61d init.
# Rebase 2b6f90d..493e61d onto d01a3ec (18 commands)
#
# Commands:
# p, pick <commit> = use commit # 使用提交
# r, reword <commit> = use commit, but edit the commit message # 使用提交,但修改提交说明
# e, edit <commit> = use commit, but stop for amending # 使用提交,但停止以便进行提交修补
# s, squash <commit> = use commit, but meld into previous commit # 使用提交,但和前一个版本融合
# f, fixup <commit> = like "squash", but discard this commit's log message # 类似于 squash,但丢弃提交说明
# x, exec <command> = run command (the rest of the line) using shell
# b, break = stop here (continue rebase later with 'git rebase --continue')
# d, drop <commit> = remove commit
# l, label <label> = label current HEAD with a name
# t, reset <label> = reset HEAD to a label
# m, merge [-C <commit> | -c <commit>] <label> [# <oneline>]
# . create a merge commit using the original merge commit's
# . message (or the oneline, if no original merge commit was
# . specified). Use -c <commit> to reword the commit message.