[plt-dev] Q. about local branches

From: Kevin Tew (tewk at cs.utah.edu)
Date: Fri Apr 23 12:15:06 EDT 2010

If you create a branch on your local machine, you must explicitly push 
it to the origin server, the first time.
git push origin NEWBRANCHNAME

'git push' pushes all local branches to the remote origin, when a remote 
refspec(branch name) exists that matches the local refspec(branch name)


Just to further clarify:

git checkout NEWBRANCHNAME --track OTHER_REFSPEC creates a new branch 
called NEWBRANCHNAME that will, by default, pull from OTHER_REFSPEC when 
NEWBRANCHNAME is your current branch and you run 'git pull'

also the forms:

git checkout NEWBRANCHNAME --track OTHER_REFSPEC
git branch    NEWBRANCHNAME --track OTHER_REFSPEC
are synonymous.

Kevin

Dave Gurnell wrote:
> On 22 Apr 2010, at 18:44, John Clements wrote:
>
>   
>> Question: is there some easy way to ensure that the local repository is fully mirrored on the server?  Aside from 
>> - not creating branches, or
>> - hard-coding the list of branches so that they can all be checked?
>>     
>
> We Untypers have been playing with git for a fortnight, and my knowledge is similarly incomplete.
>
> I've noticed folks on t'internet using "git checkout --track", which may or may not be relevant. I had a brief look at the docs but I didn't quiiiite understand what I read. Hopefully further research will provide enlightenment.
>
> -- Dave_________________________________________________
>   For list-related administrative tasks:
>   http://list.cs.brown.edu/mailman/listinfo/plt-dev
>   



Posted on the dev mailing list.