I know how to make a new branch that tracks remote branches, but how do I make an existing branch track a remote branch?
I know I can just edit the
Editing .git/config
is probably the easiest and fastest way. That's what the Git commands for handling remote branches are doing, anyway.
If you don't want to muck with the file by hand (and it's not that hard to do), you can always use git config
to do it...but again, that's just going to edit the .git/config
file, anyway.
There are, of course, ways to automatically track a remote branch when using git checkout
(by passing the --track
flag, for example), but these commands work with new branches, not existing ones.