Re: setting up tracking on push

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux