我正在尝试对我的当前分支进行交互式变基。也就是说,我有一个修复错字的提交,我想将其作为“fixup”放在另一个提交之上。
有时候它工作正常,但有时候会给出奇怪格式的错误消息,比如:
# git rebase -i
You asked me to rebase without telling me which branch you
want to rebase against, and 'branch.myBranchName.merge' in
your configuration file does not tell me, either. Please
specify which branch you want to use on the command line and
try again (e.g. 'git rebase <upstream branch>').
See git-rebase(1) for details.
If you often rebase against the same branch, you may want to
use something like the following in your configuration file:
[branch "myBranchName"]
remote = <nickname>
merge = <remote-ref>
rebase = true
[remote "<nickname>"]
url = <url>
fetch = <refspec>
See git-config(1) for details.
如果我告诉git要将分支(当前分支)合并,它会失败并显示以下信息:
# git rebase -i myBranchName
(我的编辑器打开了'noop',我认为这是git告诉我'no op'而不是实际的错误消息)。我将退出编辑器并获得:
Successfully rebased and updated refs/heads/myBranchName.
我该如何在编辑器中查看当前分支的更改并将其标记为 fixup?