0

I'm just getting my feet wet with git/github. Please bear with me.

I spent about 2 hours working on a set of files for a gh-pages repository. I edited some existing files and created some new ones during that time.

When I opened github for mac, I saw that there were 14 uncommitted changes. Foolishly, I clicked the 'sync' button before committing and the edits to my local files vanished.

Is there a way to retrieve them or is all that work lost?

I tried this without success.

$ git reflog
a2bbe73 HEAD@{0}: revert: Revert "updates"
eaa3f6a HEAD@{1}: commit: updates
b4dba1f HEAD@{2}: commit: configuration changes
8adeb66 HEAD@{3}: commit: config update
c1ffcbe HEAD@{4}: commit: domain change
e502155 HEAD@{5}: commit: initial commit
e3ab179 HEAD@{6}: commit: configs
fe11182 HEAD@{7}: commit: use the vitae theme
a61266f HEAD@{8}: clone: from https://github.com/stuboo/blog.git
Community
  • 1
  • 1
Ryan
  • 650
  • 6
  • 14
  • Could you show the result of `git reflog`. It will show the history of all git command you did. – Flows May 29 '16 at 16:04

1 Answers1

2

Check this if you have added the files to index before sync you may get it back - Git Commit & Sync Deleted All files

Hope it helps.

Community
  • 1
  • 1
Jeet
  • 5,569
  • 8
  • 43
  • 75