gpt4 book ai didi

git - 跟踪多个远程分支

转载 作者:IT王子 更新时间:2023-10-29 01:06:36 27 4
gpt4 key购买 nike

假设有三个开发人员:Alice、Bob 和 Cecil。他们决定在没有中央仓库的情况下使用 Git。他们都互相设置了 Remote ,这样:

  • Alice 有 remotes/bob/master
  • Alice 有 remotes/cecil/master
  • Bob 有 remotes/alice/master
  • Bob 有 remotes/cecil/master
  • Cecil 有 remotes/alice/master
  • Cecil 有 remotes/bob/master

现在,Alice 希望她的本地主分支跟踪两个 远程主分支。这在 Git 中甚至可能吗?如果不是,你们使用什么工作流程来解决这个问题?

最佳答案

How to track more than one remote with a given branch using Git?

简而言之,“除非您编写自定义脚本/程序/别名,否则无法完成”。

我建议他们要么就拥有开发树的公共(public)中央分支达成一致,要么相互发送 pull 请求,而不是要求每个开发人员跟踪所有其他开发人员。

关于git - 跟踪多个远程分支,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4538811/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com