Here is my situation - say I have two projects 'Proj0' and 'Proj1' and three distinct git repositories 'repo0', 'repo1', and 'repo2' on which both of these projects rely. For whatever historical and contractual reasons, these two projects depend on different versions (branches) of these three repos. So, for Proj0, repo0 needs to be on master, repo1 needs to be on dev, and repo2 needs to be on release. While for Proj1, repo0 needs to be on bugFix0, repo 2 needs to be on dev, and repo3 needs to be on dev. Summary:
Proj0:
repo0: master
repo1: dev
repo2: release
Proj1:
repo0: bugFix0
repo1: dev
repo2: dev
At some point in the future, repo0:bugFix0 will be approved and merged into master and so all developers of Proj1 will need to switch to master once that fix is approved.
My question is, is there a way in git to setup branch aliases such that I can point a globally shared aliased name to specific branches? This way, I can specify that all developers of Proj0 checkout a branch called branch0 and all developers of Proj1 checkout a branch called branch1 for all repos. For each repo, the alias would just point to the current actual branch that the project is tracking, e.g. repo0:branch0->master, repo0:branch1->bugfix0, repo1:branch0->dev, repo1:branch1->dev, repo2:branch0->release, and repo2:branch1->dev. Thus, the above table would simply look like the following:
Proj0:
repo0: branch0 (master)
repo1: branch0 (dev)
repo2: branch0 (release)
Proj1:
repo0: branch1 (bugfix0)
repo1: branch1 (dev)
repo2: branch1 (dev)
Then, when the bugfix0 is approved and merged into master, the repo0:branch1 alias would just have to be changed to point to master and the table would look like this:
Proj0:
repo0: branch0 (master)
repo1: branch0 (dev)
repo2: branch0 (release)
Proj1:
repo0: branch1 (master)
repo1: branch1 (dev)
repo2: branch1 (dev)
Note: I've looked at git symbolic-ref and it's not quite what I want - I don't thing, but might be close, or maybe I'm using it wrong. The key here is that ongoing development on repo1:dev should be tracked by repo1:branch0 globally. Really I just want multiple names for branches (i.e. branch aliases).
Thanks in advance for any help!