# 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) ...
步骤一:使用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...
# 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 # x, exec ...
找到需要修改的 commit 记录,把pick修改为edit或e,:wq保存退出。也就是: edit e0871dfb91f6a0acc5298d9e1960291629479a46 fix:fuckingthecodepick 0a4549598e56b53395c562e784553d863ec597c1 fix:正常的提交信息1# ... 三、修改 commit 的具体信息 ...
8 # p, pick <commit> = use commit 9 # r, reword <commit> = use commit, but edit the commit message 10 # e, edit <commit> = use commit, but stop for amending 11 # s, squash <commit> = use commit, but meld into previous commit ...
# 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 -a 提交了一次变化(changes),而你又不确定到底这次提交了哪些内容。你就可以用下面的命令显示当前HEAD上的最近一次的提交(commit): (main)$ git show 或者 $ git log -n1 -p 我的提交信息(commit message)写错了 如果你的提交信息(commit message)写错了且这次提交(commit)还没有推(pus...
8 # p, pick <commit> = use commit 9 # r, reword <commit> = use commit, but edit the commit message 10 # e, edit <commit> = use commit, but stop for amending 11 # s, squash <commit> = use commit, but meld into previous commit ...
# 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 # x, exec = run command (the rest of the line) using shell # b, break...