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
Junio C Hamano <junkio@cox.net>
Date
Oct 11, 2005, 21:37 UTC
Message-ID
<7vpsqbspjv.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<434BD65A.9000108@ust.hk>
Ben Lau <benlau@ust.hk> writes:
Show 7 quoted lines
>   After involves the command `git-reset --hard master^` in a 
> repository, the working
> tree , current head and index are restored to the parent of master. That 
> includes
> the content of '.git/refs/head/master'. Although the original commit 
> object is still existed
> , I couldn't find it back.
I think you can find it in .git/ORIG_HEAD.
Previous: Linus Torvalds
Message 5 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.