4

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?

2 Answers 2

5

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.

Sign up to request clarification or add additional context in comments.

Comments

1

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.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.