我正在尝试对我当前的分支进行交互式变基。即,我有一个修复错字的提交,我想在另一个提交之上进行“修复”。
有时这有效。有时这会给出格式奇怪的错误消息,例如:
# 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.
如何在编辑器中查看当前分支的更改,并将其标记为修复?