How can I set a local branch to pull / merge from a particular remote branch?
- by John
I have a local branch foo that started life as a branch off of master. Then I pushed it to my remote, and it's now happily living life with its siblings in remotes/origin
I want pull to automatically pull from remotes/origin/foo, and I want status -sb to show me how many changes I am ahead of remotes/origin/foo.
I thought the way to do this was
git config branch.foo.merge 'refs/heads/foo'
However, after doing that, I get this message:
? git status -sb
## foo
? git pull
Your configuration specifies to merge with the ref 'foo'
from the remote, but no such ref was fetched.
What am I doing wrong?