Thank you for the insight, it is much appreciated! I will read the config 
manual page as suggested. 

On Sunday, November 9, 2014 9:33:30 AM UTC-8, Konstantin Khomoutov wrote:
>
> On Fri, 7 Nov 2014 14:30:05 -0800 (PST) 
> Baus <nickb...@gmail.com <javascript:>> wrote: 
>
> [...] 
> > *Then I run the command* 
> > $ git branch -u origin/master 
> > Branch rel_010115 set up to track remote branch master from origin. 
> [...] 
> >   Local branches configured for 'git pull': 
> >     master     merges with remote master 
> >     rel_010115 merges with remote master 
> >     rel_121214 merges with remote rel_121214 
> >   Local refs configured for 'git push': 
> >     master     pushes to master     (up to date) 
> >     rel_010115 pushes to rel_010115 (up to date) 
> >     rel_121214 pushes to rel_121214 (local out of date) 
> > 
> > *I see that my pull has changed to master but not my push. What am I 
> > missing or misunderstanding?* 
>
> Making a local branch "track" a remote branch means defining for that 
> local branch an "upstream" branch from which it should *merge.* 
> Basically, the command you've run added something like this to the 
> local configuration (.git/config file): 
>
> [branch "rel_010115"] 
>     remote = origin 
>     merge = refs/heads/master 
>
> Note that there's no "push = " or something like this. 
>
> Instead, to define the way the local branches are pushed when the user 
> does not explicitly specify what to update with what, you should tweak 
> the push.default configuration option.  It has lots of values, and the 
> current default with git < 2.0 is "matching" which means only branches 
> already existing in the remote repo with names those of local branches 
> are pushed.  Git 2.0 changed this default to "simple". 
>
> I strongly urge you to read the gitconfig manual page, searching for 
> the options starting with "branch." and also study the section on 
> push.default. 
>
> I reckon the reason for Git having these things working the way they 
> are is that Git wasn't created with the centralized workflow in mind 
> (in which you only ever push to a single repository, and always to the 
> branch you've based your local branch on). 
>
> The results you're observing is due to your push.default being 
> defaulted (or set explicitly) to "matching".  Switch it to "upstream" 
> or "simple" (for Git >= 1.9) to make relations between your refs for 
> pushing look the way you want them. 
>

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to