I have two private repositories on one machine. Let's call them repo-A and repo-B, which are the directories ~/repo-A and ~/repo-B, respectively. repo-A has two relevant branches: master and live. I'd like to set up repo-B to track repo-A's live branch, so that git pull
will pull any updates from repo-A's live branch into repo-B's master branch. Right now, I have the following in repo-B's .git/config:
[remote "origin"]
url = /home/stutzbach/repo-A/
fetch = +refs/heads/live:refs/remotes/origin/live
[branch "master"]
remote = origin
merge = refs/heads/master
However, when I run git pull
, it seems to pull from repo-A's master branch. Obviously, I don't have it set up right. What's the right way?