Re: [PATCH] logging branch deletion to help recovering from mistakes
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Dec 7, 2010, 20:25 UTC
- Message-ID
- <7vfwu9pbyj.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <20101207180236.GC21483@burratino>
Jonathan Nieder <jrnieder@gmail.com> writes:
Show 18 quoted lines
> Casey Dahlin wrote: >> On Tue, Dec 07, 2010 at 11:45:20AM -0600, Jonathan Nieder wrote: >>> Casey Dahlin wrote: > >>>> Could commits made onto a detached head also show up here? Or is that >>>> better thwarted with another mechanism? >>> >>> I think that's better thwarted with the HEAD reflog: >>> >>> $ git log -g HEAD >> >> I was more worried about changes that were made onto a detached head, >> and then the head was reattached, leaving the new commits dangling. > > But isn't that exactly what a detached HEAD is for? If one wants > the experiments one does on detached HEAD to be kept around "just > in case", wouldn't it make more sense to give them a (branch) name so > they can be separated from one another?
What are you arguing after giving a correct answer. "git log -g HEAD" keeps track of what was at the tip of HEAD, be it pointing at a branch or pointing diretly at a commit in a detached state, no?