> Wow, thanks.
> So to clarify: git fetch origin jquery does download the commits but
> not the branch (labels?)

Correct, essentially.  From the documentation:  "Fetches named heads
or tags from one or more other repositories, along with the objects
necessary to complete them."  That is, it fetches the branch, which is
just an SHA1 of the commit it points to, then all the objects
necessary to complete it (that commit, any parents of that commit, all
the trees and blobs representing the directories/files in that
commit...).  The only thing it doesn't do is create a branch called

If you already had a remote branch origin/jquery, it will have been
updated to point to the appropriate commit, and you can as Jacob said,
use "git checkout -b jquery origin/jquery" (or to just create and not
check out, "git branch jquery origin/jquery").  However, if there was
no such branch, FETCH_HEAD will be the only record of the position of
the fetched branch; you can use "gti checkout -b jquery FETCH_HEAD" or
"git branch jquery FETCH_HEAD" to (check out and) create a branch

All that said, I doubt you really want to mess with fetch in this
way.  If you use "git fetch origin" without any branch specified,
it'll fetch all the branches of origin, and update (or create or
delete as appropriate) remote branches (e.g. origin/jquery) in your
repository to match.  ("git fetch origin" should be synonymous with
"git remote update origin", if you find that easier to remember)


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 
For more options, visit this group at 

Reply via email to