我最常听到同事说我用 master 重新定位了我的分支,但这是“正确”的说法吗?你是根据 ref rebase 还是用 ref rebase ?两种方式都可以接受/准确吗?
最佳答案
如果您在 git/git
(Git 源代码)中搜索这两个表达式,您将得到:
对于 rebase with
:
D:\git\git>git grep -i "rebase with"
Documentation/git-pull.txt:When set to `preserve` (deprecated in favor of `merges`), rebase with the
Documentation/git-rebase.txt:- Start an interactive rebase with `git rebase -i <commit>^`, ...
Documentation/git-rebase.txt:- Continue the rebase with `git rebase --continue`.
...
从来没有使用过“with a branch”。
关于“基于”:
po/bg.po:msgid "Cannot rebase onto multiple branches."
po/bg.po:msgid "rebase onto given branch instead of upstream"
po/bg.po:msgid "invalid branch.%s.merge; cannot rebase onto > 1 branch"
所以你显然是在重新建立一个分支,而不是“有一个分支”。
那是在
git rebase
命令的定义中:Reapply commits on top of another base tip
关于git - 您是否重新使用(或其他介词)另一个分支?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58666447/