> Yes. > Or `git tag recentwork 8658a39`. > Or `git checkout master && git merge 8658a39`.
Everything Konstantin said is correct, but I just wanted to add that git tag will not get you out of the "detached HEAD" state, so you'll probably want to create a branch, or merge the hash into master directly, unless the commit really is a special one that you'd like to tag for easy reference later. dan On Tue, Jun 1, 2010 at 2:46 PM, Konstantin Khomoutov <[email protected]> wrote: > On Jun 2, 1:07 am, Trans <[email protected]> wrote: > >> Sorry, make that: >> $ git branch recentwork 8658a39 > > Yes. > Or `git tag recentwork 8658a39`. > Or `git checkout master && git merge 8658a39`. > > In this sense, tag and branch names are just alternative means to > refer to these "true" names of commit objects which are hashes. So you > can use these hash names in any command expecting a branch or a tag > name; that's why Git docs name such things with a common name "commit- > ish". > > -- > 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 [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/git-users?hl=en. > > -- 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 [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/git-users?hl=en.
