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

Re: How to recover a lost commit...

From
PDPatrick Doyle <wpdster@gmail.com>
Date
Nov 11, 2010, 17:39 UTC
Message-ID
<AANLkTi=9bu1nwjFgxbXGN+4scMAgrCgmb95H8E3Nfj1x@mail.gmail.com>
In-Reply-To
<20101111165023.GB16972@burratino>
On Thu, Nov 11, 2010 at 11:50 AM, Jonathan Nieder <jrnieder@gmail.com> wrote:
Show 6 quoted lines
> Couldn't
>
>        $ git merge --no-commit svn_to_git_wip
>        $ git reset
>
> have worked?

Hi Jonathan, Thanks. That's where I started (although I also added the --no-ff flag to the git-merge command) , but then I decided to get fancy and switched to the svn_to_git_wip branch and rebase it on master first. In hindsight, I was trying to be to clever for my own good. But I figured I could always undo any mistakes. I was just surprised to find that my work-in-progress had disappeared despite the fact that I hadn't done a commit. (It's possible/likely that I did an implicit commit when I was playing with rebase.)

Anyway, next time I'll use git-stash, and in the future, I'll be much more paranoid about using git-reset.

--wpd
Previous: Jonathan Nieder
Message 8 of 8 in “How to recover a lost commit...”
  1. Patrick DoyleNov 11, 2010
  2. Seth RobertsonNov 11, 2010
  3. Patrick DoyleNov 11, 2010
  4. Jonathan NiederNov 11, 2010
  5. Patrick DoyleNov 11, 2010
  6. Junio C HamanoNov 11, 2010
  7. Jonathan NiederNov 11, 2010
  8. Patrick DoyleNov 11, 2010

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.