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

Re: Git screwup with reset

From
Sverre Rabbelier <srabbelier@gmail.com>
Date
May 18, 2009, 15:11 UTC
Message-ID
<fabb9a1e0905180811r6e408ce5ged65ddfb3846111c@mail.gmail.com>
In-Reply-To
<9D569322-6A7B-4447-962C-0C740945E227@orgsync.com>
Heya,
On Mon, May 18, 2009 at 16:58, jake varghese <jake@orgsync.com> wrote:
>  Anyone know of a way to get this stuff back.

Make a backup copy of that .git directory, so that whatever you do you won't lose that work ;). Also, the reason you can't merge or rebase that hash is because it's the hash of a tree or a blob, not a commit. You can use git commit-tree [0] to create a commit from your lost tree, but that works only if you have a tree (for just a blob you can use git cat-file [1])

[0] http://www.kernel.org/pub/software/scm/git/docs/git-commit-tree.html [1] http://kernel.org/pub/software/scm/git/docs/git-cat-file.html

-- 
Cheers,

Sverre Rabbelier
Previous: Shawn O. Pearce
Message 3 of 3 in “Git screwup with reset”
  1. jake vargheseMay 18, 2009
  2. Shawn O. PearceMay 18, 2009
  3. Sverre RabbelierMay 18, 2009

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.