【发布时间】:2019-03-23 00:47:10
【问题描述】:
在this comment, @torek(目前声望172509)说:
我实际上建议完全避免使用
git pull,原因与您建议避免使用--autostash的原因相同
避免git rebase --autostash 的reason given 是:
用起来很方便,用不起来就麻烦了
git pull 不起作用时会在哪些方面出现问题?
My robust automated solution to avoiding git pull --autostash is non-trivial.
是否有可靠的自动化解决方案来避免git pull?
【问题讨论】:
-
pull和rebase --autostash有什么关系?另外,请记住拉取只是获取然后合并。 -
@evolutionxbox 大概是一系列可能丢失信息(例如退出状态)的命令(stash push、rebase、stash pop / fetch merge)。有关更多上下文,请参阅链接。
-
“健壮”往往很难。由于 pull = fetch + 2nd-git-command,运行
git fetch(假设标准配置在任何时候都非常安全),然后围绕您想要的第二个命令构建健壮的部分。 -
@chevybow 太好了,这就是我想要的答案。谢谢!
标签: git git-merge git-pull pull git-fetch