On 29 Jul 2012, David C. Rankin outgrape:
22:30
archangel:/dat_f/tde/tde/main/applications/kbookreader> git branch -l
* master
You have new mail in /var/mail/david
16:21 archangel:/dat_f/tde/tde/main/applications/kbookreader> git branch -r
origin/HEAD -> origin/master
origin/master
16:21 archangel:/dat_f/tde/tde/main/applications/kbookreader> git checkout v3.5.13
warning: unable to rmdir admin: Directory not empty
warning: unable to rmdir cmake: Directory not empty
Note: checking out 'v3.5.13'.
Do you have a dirty working tree with stuff in the admin and cmake
directories? git will refuse to remove them in that case, to avoid
losing your work (though the pointless warning looks like a git bug).
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 12476d8... Link most Trinity DSOs against the most common kdelibs
libraries to compensate for linking changes in modern distributions such as
Ubuntu Oneiric
It looks like since it is a 'tag' and not a 'branch', git checkout
won't work.
Uh, not only did it work, it told you it worked. You can check out *any*
commit at all as a new branch, including commits referenced by refs such
as branches or tags. But if you check out a tag without creating a new
branch off of it, git will warn you, as above, that if you commit at
this point and then switch away, your commit is pointed to by nothing
and thus will eventually be lost (not at once -- the reflog will point
to it for a while, but reflogs are routinely expired by automated 'git
gc' runs, so your commit will eventually vanish).
(This state is called 'detached HEAD', because HEAD (which always points
to your current checkout) is not pointing to the same place as the head
of any branch, thus 'detached' from all branches.)
--
NULL && (void)