Track multiple remote branches
-
13-10-2019 - |
Question
So let's say there are three developers: Alice, Bob, and Cecil. They decide to use Git without a central repo. They all set up remotes to each other, so that:
- Alice has
remotes/bob/master
- Alice has
remotes/cecil/master
- Bob has
remotes/alice/master
- Bob has
remotes/cecil/master
- Cecil has
remotes/alice/master
- Cecil has
remotes/bob/master
And now, Alice wants her local master branch to track both remote master branches. Is that even possible in Git? If not, what workflow do you guys use to work around this?
Solution
How to track more than one remote with a given branch using Git?
In short, "can't be done unless you write a custom script/program/alias".
I suggest that they either agree on a common central branch that holds the development tree, or that they send each other pull requests instead of asking each developer to track every other developer.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow