0

So silly me, I had lost control of my repository a little bit,

I had a commit of 14,000 changes pending

I was using the mac github desktop application. I simply gave the commit a title, description and hit commit to master. Some loading went on, then all of a sudden the whole commit disappeared.

That is literally all I did and I have now lost a weeks worth of work.

Any chance I can retrieve this lost commit?

Git Reflog gives

86d0999 HEAD@{0}: cherry-pick: On master: GitHub: Stashing to pull in remote changes
04f207b HEAD@{1}: merge 04f207b: Fast-forward
ce9f5bf HEAD@{2}: reset: moving to HEAD^
04f207b HEAD@{3}: commit: Table Functionality
ce9f5bf 

What is the erroneous line at the bottom?

mwild
  • 1,483
  • 7
  • 21
  • 41
  • Possible duplicate of [Instead of Committing Files, I hit 'Sync' in GitHub app](http://stackoverflow.com/questions/40052451/instead-of-committing-files-i-hit-sync-in-github-app) – Josh Lee Feb 08 '17 at 21:09
  • Can you look for any dangling commits? `git fsck --lost-found` – Matt Clark Feb 08 '17 at 21:13
  • @JoshLee Thanks for the link! Thankfully this worked a treat!! Thanks – mwild Feb 08 '17 at 21:18

1 Answers1

0

If you didnt actually do a commit it may be hard. Check the reflogs.

https://git-scm.com/docs/git-reflog

Thomas
  • 1,177
  • 1
  • 14
  • 26