views:

238

answers:

2

I'm missing a few important commits after my computer lost power in the middle of a "git svn dcommit" operation, and I'm unsure of how to get them back. "git log" doesn't show the commits, any ideas?

+1  A: 

Git keeps track of everything you do to the repository in the reflog. You can use git reflog to view recent commits, and resurrect them from there.

I found a blog entry called git reflog: no commits left behind which describes what to do to recover these commits.

Greg Hewgill
+1  A: 

It's a good idea to do a "git log" and/or "git branch -v" before doing anything that might change branches, like "git svn dcommit". You can always scroll back the console and copy/paste the commit IDs in case they get messed up.

Alex Morega