Miles Bader wrote:
Jay Soffian <jaysoffian@xxxxxxxxx> writes:
I don't think we need a new command, but it would probably fit into
git remote
$ git remote track <remote> [<branch>]
That seems a bit backwards -- it's more of a branch operation than a
remote operation...
Agreed.
We just ran into this situation today with pull: Someone wanted one of their local branches to start tracking a remote.
It would be good if the branch command allowed modification of a branch's properties. At the very least, branch-creation commands like "git branch --track foobranch origin/master" could offer to modify if the branch already exists, instead of just quitting.
BTW, I think the following (untested) incantation adds tracking to a branch:
git config branch.foobranch.remote origin
git config branch.foobranch.merge refs/heads/master
(Substitute "origin" and "master" to suit your needs.)
M.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html