Using the --track option when creating a branch

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <git@...>
Date: Wednesday, October 29, 2008 - 11:23 am

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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Using the --track option when creating a branch, Bill Lear, (Wed Oct 29, 11:23 am)
Re: Using the --track option when creating a branch, Sam Vilain, (Thu Oct 30, 1:12 am)
Re: Using the --track option when creating a branch, Bill Lear, (Thu Oct 30, 8:04 am)
Re: Using the --track option when creating a branch, Santi Béjar, (Thu Oct 30, 8:41 am)
Re: Using the --track option when creating a branch, Bill Lear, (Thu Oct 30, 8:12 am)
Re: Using the --track option when creating a branch, Andreas Ericsson, (Thu Oct 30, 8:25 am)
Re: Using the --track option when creating a branch, Sam Vilain, (Thu Oct 30, 12:44 pm)
Re: Using the --track option when creating a branch, Samuel Tardieu, (Thu Oct 30, 9:52 am)
Re: Using the --track option when creating a branch, Jeff King, (Sun Nov 2, 12:23 am)
Re: Using the --track option when creating a branch, Andreas Ericsson, (Thu Oct 30, 10:06 am)
Re: Using the --track option when creating a branch, Samuel Tardieu, (Thu Oct 30, 10:23 am)
Re: Using the --track option when creating a branch, Andreas Ericsson, (Thu Oct 30, 10:54 am)
Re: Using the --track option when creating a branch, Sam Vilain, (Thu Oct 30, 1:57 pm)
Re: Using the --track option when creating a branch, Samuel Tardieu, (Thu Oct 30, 11:04 am)
Re: Using the --track option when creating a branch, Andreas Ericsson, (Thu Oct 30, 11:25 am)
Re: Using the --track option when creating a branch, Bill Lear, (Thu Oct 30, 11:42 am)
Re: Using the --track option when creating a branch, Marc Branchaud, (Thu Oct 30, 3:13 pm)
Re: Using the --track option when creating a branch, Pierre Habouzit, (Thu Oct 30, 10:41 am)
Re: Using the --track option when creating a branch, Samuel Tardieu, (Thu Oct 30, 10:56 am)
Re: Using the --track option when creating a branch, Sam Vilain, (Thu Oct 30, 2:00 pm)
Re: Using the --track option when creating a branch, Santi Béjar, (Wed Oct 29, 12:25 pm)
Re: Using the --track option when creating a branch, Bill Lear, (Wed Oct 29, 4:33 pm)