0
git merge --abort

then it went back to latest commit head and deleted all my files.

My project was on merging stage and I did

git add 
git commit -m "message"

then it didnt allow me to commit saying "cannot do a partial commit during merge" then I aborted merge by

git merge --abort

Then it deleted all my files and went back to last commit stage. This cause me lose all my files and codes i did in between.

How to recover all my files that i had before i ran git merge --abort

TeachMe
  • 535
  • 1
  • 5
  • 16
  • Possible duplicate of [Restore git files deleted after git merge --abort](https://stackoverflow.com/questions/39468125/restore-git-files-deleted-after-git-merge-abort) – jojo Jul 14 '19 at 06:33
  • didnt help. asked the question after hearing out many options. – TeachMe Jul 14 '19 at 13:11
  • Are you including that period in the command? – evolutionxbox Jul 14 '19 at 16:39
  • @evolutionxbox No. that is typo – TeachMe Jul 17 '19 at 09:12
  • Make sure to resolve _all conflicts_ by making the changes and _adding all_ of those files before committing. I think this is why you're getting the partial commit error. You can't recover the files if your IDE doesn't have them in it's history. This is similar to resetting (hard) before you've added or committed changes. – evolutionxbox Jul 17 '19 at 10:15

0 Answers0