git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Using the --track option when creating a branch
@ 2008-10-29 15:23 Bill Lear
  2008-10-29 16:25 ` Santi Béjar
  2008-10-30  5:12 ` Sam Vilain
  0 siblings, 2 replies; 23+ messages in thread
From: Bill Lear @ 2008-10-29 15:23 UTC (permalink / raw)
  To: git

We have had a few "crossed stream" problems when developers are
working on a local branch and they do an unguarded git push/pull,
when they really intended to do git push/pull origin branchname.

We use git in a way that makes it desirable for us to only push/pull
to the same remote branch.  So, if I'm in branch X, I want 'git push'
to push to origin/X, and 'git pull' to fetch into origin/X and then
merge into X from origin/X.

In other words, we want git push/pull to behave in branches other than
master the same way it does when in master.

I have discovered the '--track' option when creating a local branch,
and this appears to me to be the thing that gives us the desired
behavior.

Before I tell the rest of the team that this is the correct way
to do things, I need to be sure I am correct, so if anyone here
can confirm or deny this, I'd appreciate it.

Also, once a branch has been created, how can we add a '--track' option
after the fact?

Finally, is there a 'global' config setting that would set this behavior
for all repos (new or existing)?

We are using git 1.6.* versions here, mostly.

Thanks.


Bill

^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2008-11-02  4:25 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-29 15:23 Using the --track option when creating a branch Bill Lear
2008-10-29 16:25 ` Santi Béjar
2008-10-29 20:33   ` Bill Lear
2008-10-30  5:12 ` Sam Vilain
2008-10-30 12:04   ` Bill Lear
2008-10-30 12:12     ` Bill Lear
2008-10-30 12:25       ` Andreas Ericsson
2008-10-30 13:52         ` Samuel Tardieu
2008-10-30 14:06           ` Andreas Ericsson
2008-10-30 14:23             ` Samuel Tardieu
2008-10-30 14:41               ` Pierre Habouzit
2008-10-30 14:56                 ` Samuel Tardieu
2008-10-30 18:00                   ` Sam Vilain
2008-10-30 14:54               ` Andreas Ericsson
2008-10-30 15:04                 ` Samuel Tardieu
2008-10-30 15:25                   ` Andreas Ericsson
2008-10-30 15:42                     ` Bill Lear
2008-10-30 19:13                       ` Marc Branchaud
2008-10-30 17:57                 ` Sam Vilain
2008-10-30 23:24               ` Jakub Narebski
2008-11-02  4:23           ` Jeff King
2008-10-30 16:44         ` Sam Vilain
2008-10-30 12:41     ` Santi Béjar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).