Git noob here.
- Code: Select all
$ git reset --hard <commit before merge>
Thought I had mangled up my local repository for good the other day. After merging two branches I only got a few of the files when checking out each of the branches. In addition I got a lot of strange permission denied errors about directories and files in the repo.
Finally I figured that I maybe had Ctrl-c:ed the merge (can't still remember for sure; it was late) to do it --verbose without thinking of the consequences. Finally I figured I should reset hard to the commit before the merge. Problem solved. Just like that. Phew.
Afterwards I did test checking out both branches to see that they where ok, and then merge again, and then checked them both out again. So far it seems all is good.