中止互動式 Rebase

你已經開始了互動式 rebase。在你選擇提交的編輯器中,你確定出現了問題(例如缺少提交,或者你選擇了錯誤的 rebase 目標),並且你想要中止 rebase。

要做到這一點,只需刪除所有提交和操作(即所有不以 # 符號開頭的行),rebase 將被中止!

編輯器中的幫助文字實際上提供了以下提示:

# Rebase 36d15de..612f2f7 onto 36d15de (3 command(s))
#
# 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
#
# These lines can be re-ordered; they are executed from top to bottom.
#
# If you remove a line here THAT COMMIT WILL BE LOST.
#
# However, if you remove everything, the rebase will be aborted.
#          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
# Note that empty commits are commented out