git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Keeping reflogs on branch deletion

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Feb 14, 2008, 15:08 UTC
Message-ID
<alpine.LSU.1.00.0802141505440.30505@racer.site>
In-Reply-To
<alpine.LFD.1.00.0802140945520.2732@xanadu.home>
Hi,
On Thu, 14 Feb 2008, Nicolas Pitre wrote:
Show 13 quoted lines
> On Thu, 14 Feb 2008, Brian Downing wrote:
> 
> > When deleting a branch, is there any reason we can't add a deletion 
> > entry into the reflog and keep the reflog around?  This would seem to 
> > be a lot safer; I know I've been burned by expecting the reflog safety 
> > net to be there, and surprised that it's not when I've deleted a 
> > branch.
> 
> No.  That would only accumulate dead reflog files in the repository.
> 
> And as Junio said above, the "HEAD" reflog contains everything you moved 
> to, including detached heads, and of course branch heads that might now 
> be deleted.  You can easily retrieve a deleted branch head from there.
Note that you do not necessarily update branches while they are HEAD:
	$ git push . to-fast-forward:HEAD
But that's too fabricated an example, I guess.
So I agree that HEAD reflog is enough.

Ciao, Dscho

Previous: Nicolas PitreNext: Jeff King
Message 8 of 15 in “A couple branch questions”
  1. Jay SoffianFeb 14, 2008
  2. David SymondsFeb 14, 2008
  3. Bill LearFeb 14, 2008
  4. David SymondsFeb 14, 2008
  5. Junio C HamanoFeb 14, 2008
  6. Keeping reflogs on branch deletionBrian Downing, Feb 14, 2008
  7. Nicolas PitreFeb 14, 2008
  8. Johannes SchindelinFeb 14, 2008
  9. Jeff KingFeb 14, 2008
  10. Nicolas PitreFeb 14, 2008
  11. Jeff KingFeb 14, 2008
  12. Nicolas PitreFeb 14, 2008
  13. Jeff KingFeb 14, 2008
  14. Wincent ColaiutaFeb 14, 2008
  15. Jakub NarebskiFeb 14, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.