easy way to make tracking branches?

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

 



Hi,

assume I have a branch "foo" in my local repo, a remote "srv", and
a branch "bar" on srv (i.e. generated with "git push srv foo:bar").

Now I want to make "foo" a tracking branch for "bar".
I do:

	git config branch.foo.remote srv
	git config branch.foo.merge refs/heads/bar

And to get a comfortable git-push, I do:

	git config --add remote.srv.push foo:bar


Because I do not always remember the sequence, I have to look it
up or I just do

	git checkout -b foo2 srv/bar
	git branch -d foo
	git branch -m foo

which is suboptimal because deleting foo can remove some
other settings for the branch, e.g. mergeoptions.


So I wonder if there is some easier-to-remind way to let my branch
foo track my remote branch bar, or, if not, could it be useful to
have something like

	git push --make-tracking srv foo:bar
	# push foo -> bar and let foo track bar...
	# if foo already tracks bar, ignore the option

or should I just write a tiny script for me and shut up? :-)


Regards,
  Stephan

-- 
Stephan Beyer <s-beyer@xxxxxxx>, PGP 0x6EDDD207FCC5040F
--
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