On Jun 2, 1:56 am, Dan Preston <danpres...@gmail.com> wrote:
> > 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.

I mostly wanted to demonstrate that these hash names are no magic. :-)

Also, my idea was this: I found myself in situations like this one
being discussed, and my first temptation after finding the relevant
top commit in the reflog always was "tag that immediately, then cool
down, analyse the situation and think", that is, just give that
regained precious commit a name so it's now "referenced".
Then if it turns out I really want a branch I can create a branch and
get rid of the tag. Or I can just merge the line of development
pointed to by that tag to a branch this history is really belongs to
and get rid of the tag, too.

So it boils down to personal preferences.

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