我想开始在另一个开发人员的功能分支上工作(我们使用 git 和 git flow)。 AFAIK 该分支已发布(推送)。我怎样才能将它获取到我的本地存储库?
我试过:
git flow feature pull origin/XXXXXX-1003b
fatal: 'origin/XXXXXX-1003b' does not appear to be a git repository
fatal: The remote end hung up unexpectedly
Failed to pull from remote 'origin/XXXXXX-1003b'.
和:
git flow feature pull XXXXXX-1003b
fatal: 'XXXXXX-1003b' does not appear to be a git repository
fatal: The remote end hung up unexpectedly
Failed to pull from remote 'XXXXXX-1003b'.
请指教。谢谢
最佳答案
git 流功能轨迹
要跟踪远程上的现有功能分支,请使用 feature track
:
git flow feature track xxxxxx-1003b
或者只是“正常方式”:
git fetch origin
git branch -a # list all branches
git checkout feature/xxxxxx-1003b
即更新远程源,然后 check out 你同事的分支对应的分支。
关于git flow - 如何开始在现有功能分支上工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19638292/