I have a repo A with a branch a and repo B with branch b.
I would like to make the branch B:b track A:a (with a local copy of either of these branches if necessary). Is that possible?
In the local B repo:
First setup a remote to A repositoy named upstream (or any other name you prefer):
git remote add upstream <A remote address> Make branch b track a:
check to see if you have a local b branch:
git branch --list if you already have got a local b:
git branch -u upstream/a b if you does not have a local b:
git checkout -b b upstream/a Now in the b Branch of B repo if you do git fetch, git pull and git push it will sync against A:a and for syncing against original B:b run git pull origin b for example to pull.