I'd say by definition a git branch is what is listed by "git branch". Having said that, it is just a label for a commit. There are other kinds of labels for commits, for example tags. Whenever you fetch (pull) something from a remote a local copy (of the commits on the remote) is made, and they also have labels. But its not really a git branch, as you saw you can't check it out directly and you can't add commits on top without actually creating a new branch off it.
On Friday, December 26, 2014 9:07:06 PM UTC+1, Dima Pasechnik wrote: > > On 2014-12-26, Volker Braun <vbrau...@gmail.com <javascript:>> wrote: > > ------=_Part_5531_1685050387.1419616059330 > > Content-Type: multipart/alternative; > > boundary="----=_Part_5532_1775001320.1419616059330" > > > > ------=_Part_5532_1775001320.1419616059330 > > Content-Type: text/plain; charset=UTF-8 > > > > On Friday, December 26, 2014 6:23:43 PM UTC+1, Dima Pasechnik wrote: > >> > >> By the way, I noticed some change in the behaviour of trac git server; > >> it seems that fetching u/foo/bar automatically results in > >> creation of a local branch trac/u/foo/bar. > > > > > > No it doesn't. Local branches would be in the output of "git branch". > The > > fetched branch is of course know to the local repo under a name, e.g. in > > the output of "git ls-remote trac". > > but then what does the following mean: > > $ git fetch trac u/dimpase/16929 > remote: Counting objects: 21, done. > remote: Compressing objects: 100% (12/12), done. > remote: Total 14 (delta 9), reused 7 (delta 2) > Unpacking objects: 100% (14/14), done. > From git://trac.sagemath.org/sage > * branch u/dimpase/16929 -> FETCH_HEAD > * [new branch] u/dimpase/16929 -> trac/u/dimpase/16929 > > $ git remote -v > origin https://github.com/sagemath/sage.git (fetch) > origin https://github.com/sagemath/sage.git (push) > trac git://trac.sagemath.org/sage.git (fetch) > trac g...@trac.sagemath.org:sage.git (push) > > > What does this [new branch] mean? > > Note that now I can e.g. do > > $ git checkout trac/u/dimpase/16929 > Note: checking out 'trac/u/dimpase/16929'. > > You are in 'detached HEAD' state. You can look around, make experimental > changes and commit them, and you can discard any commits you make in > this > state without impacting any branches by performing another checkout. > > If you want to create a new branch to retain commits you create, you may > do so (now or later) by using -b with the checkout command again. > Example: > > git checkout -b new_branch_name > > HEAD is now at a576d91... Ported Ingo's code to Sage 6.5.beta1 > > > That is to say, 'trac/u/dimpase/16929' really got created. > > Dima > > > -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com. Visit this group at http://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.