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

Re: How to restore the original head after `git-reset --hard master^`

From
Linus Torvalds <torvalds@osdl.org>
Date
Oct 11, 2005, 17:04 UTC
Message-ID
<Pine.LNX.4.64.0510111003180.14597@g5.osdl.org>
In-Reply-To
<Pine.LNX.4.63.0510111240410.23242@iabervon.org>
On Tue, 11 Oct 2005, Daniel Barkalow wrote:
> 
> That reminds me: if you lose all of your refs, it's hard to get them back, 
> because git-fsck-objects aborts if you don't specify any heads or have any 
> refs. Is there some reason for this check?

"git prune" is the reason for that check. Pruning your whole object store is likely not what you want ;)

You might make it abort only when "--unreachable" has been specified..
		Linus
Previous: Daniel BarkalowNext: Junio C Hamano
Message 4 of 5 in “How to restore the original head after `git-reset --hard master^`”
  1. Ben LauOct 11, 2005
  2. Linus TorvaldsOct 11, 2005
  3. Daniel BarkalowOct 11, 2005
  4. Linus TorvaldsOct 11, 2005
  5. Junio C HamanoOct 11, 2005

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.