On Wed, Apr 7, 2010 at 11:54, Pito Salas <r...@salas.com> wrote:
> I thought I understood this but here's a puzzle for me:
>
> 1) Download jquery branch locally:
> $ git fetch origin jquery
> From github.com:trustthevote/ElectionManager
>  * branch            jquery     -> FETCH_HEAD
> Looks like it worked, right?
>
> 2) List all branches. Where is it?
> $ git branch -a
>  converterimport
>  develop
>  domain_tables
>  jurist_list
>  master
>  txballot
> * web-theme
>  remotes/origin/HEAD -> origin/master
>  remotes/origin/converterimport
>  remotes/origin/cucumber
>  remotes/origin/develop
>  remotes/origin/domain_tables
>  remotes/origin/idents
>  remotes/origin/master
>  remotes/origin/mimic_nh_ballots
>  remotes/origin/railroad
>  remotes/origin/refactorrender
>  remotes/origin/release-001
>  remotes/origin/singleballotimp
>  remotes/origin/tgd_dev
>  remotes/origin/txballot
>  remotes/origin/web-theme
>  remotes/origin/wicked_pdf
>  remotes/origin/yaml_batch_import
>  remotes/origin/ymlsupport
>
> Anyone see what's messing me up? Probably something stupid...
>
> Thanks!
>
> Pito
>

The problem is that git fetch doesn't _create_ branches.

When you downloaded the branch with "git fetch origin jquery", it
stored the ref locally as FETCH_HEAD ("cat .git/FETCH_HEAD" if you
want to see the details).  If you want to create a local branch based
off of the remote jquery branch, you can "git fetch && git checkout -b
jquery origin/jquery".  The "git fetch" in this case is simply "update
all of my references to the origin repo", and "git checkout -b jquery
origin/jquery" will create a local jquery branch based off of the
origin/jquery reference.

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To post to this group, send email to git-us...@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.

Reply via email to