Re: How to recover a lost commit...
- From
Jonathan Nieder <jrnieder@gmail.com>
- Date
- Nov 11, 2010, 16:50 UTC
- Message-ID
- <20101111165023.GB16972@burratino>
- In-Reply-To
- <AANLkTinfYTMKicr3V=T=scVpOte_XrmaDgVA_oMj2fYU@mail.gmail.com>
Patrick Doyle wrote:
> But I'm curious... given the reflog show below... can any of you tell > what I did to myself to shoot myself in the foot? Aside from "use git > stash next time dummy", is there any way I could have avoided this?
I don't know. :) But if you still have the svn_to_git_wip branch, you might want to try
$ git log -g svn_to_git_wip
which just shows the history of that branch.
Show 6 quoted lines
> Today I want to pick up where I left off with the work-in-progress (on > the "svn_to_git_wip" branch). What I _really_ wanted to do was to > grab the contents of that branch, dump them into my working directory > for the master branch, and continue as if nothing had happened. (This > is exactly the use case for which git-stash was created, and I > probably should have used that to begin with.)
Couldn't
$ git cherry-pick --no-commit svn_to_git_wip $ git reset
or something like
$ git merge --no-commit svn_to_git_wip $ git reset
have worked?
Hope that helps, Jonathan