步骤一:使用git log命令查看之前的commit记录,找到要修改的commit的哈希值。 步骤二:使用git rebase -i命令,对要修改的commit进行交互式重新排列。这里的是要修改的commit的哈希值。运行该命令后,会打开一个交互式的文本编辑器。 步骤三:在文本编辑器中,将要修改的commit的行的pick标记修改为edit,并保存退出。 步骤...
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 re...
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
pick =use commit9# r, reword =use commit, but edit the commit message10# e, edit = use commit, but stopforamending11# s, squash =use commit, but meld into previous commit12# f, fixup = like
进入commit会话框 选择Amend图标 上图所示的步骤: 右击Project -> Team -> Commit ... 选择右上角的 **Amend (Edit Previous Commit) 图标 勾选需要追加的 e.txt 修改注释内容,并提交。 事后可以查看日志,并对比git log和git reflog有什么不同 ? 自己做实验观察。
# edit = use commit, but stop for amending //改上面的 pick 为 edit # squash = use commit, but meld into previous commit # # If you remove a line here THAT COMMIT WILL BE LOST. # However, if you remove everything, the rebase will be aborted. ...
根据提示,修改完成之后执行git commit --amend修改提交,然后执行git rebase --continue继续rebase。 所以rebase -i的流程如下: git rebase -i parentCommitID 在弹出的文本编辑器中,将要修改的commit的前方的pick改为edit,保存,关闭文本编辑器 在命令行处于等待状态后,修改内容 ...
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# d, drop = remove commit ...
# Commands:# p,pick<commit>=use commit # r,reword<commit>=use commit,but edit the commit message # e,edit<commit>=use commit,but stopforamending # s,squash<commit>=use commit,but meld into previous commit # f,fixup<commit>=like"squash",but discardthiscommit's log message ...
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 # x, exec = run command (the rest of the line) using shell # b, break = stop he...