git - 您是否重新使用(或其他介词)另一个分支?

标签 git terminology rebase

我最常听到同事说我用 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/

相关文章:

unicode - ASCII 范围外的 Unicode 字符的术语

git - `git branch --list` 返回文件?

git - 将单个分支历史转换为许多较小的 merge 分支

linux - 将系统上所有 git 存储库的远程从 http 更改为 ssh

c++ - 类 git 界面的最佳方法

Git文件夹已删除,但没有消失

git - C# 项目中的所有文件是否都需要置于版本控制之下?

python - 在考虑执行流程时,异常的反义词是什么?

language-agnostic - 讨论框架时 "light weight"是什么意思

Git rebase 最终提交不存在