2

Before commit the changes by mistake, I have clicked on GitHub Desktop Sync button and now all my last 2 week changes has been discarded. Now my local code has come to the same state as was in previous commit.

Is there any way to revert back my lost changes ?

Vaib
  • 21
  • 2
  • Is the lost code anywhere in a commit? If so, you can get it back. It it's not in any commit, either locally or on github, and also not in your local uncomitted changes, then it's lost .. forever. – GolezTrol Oct 22 '15 at 05:50
  • Did you add your code to the index (stage), before clicking sync? – VonC Oct 22 '15 at 06:15
  • @GolezTrol - No...Lost code was not committed. I tried to commit and I got an error with one file was not getting commit. so i just delete that file from file system and by mistake I clicked on Sync. – Vaib Oct 22 '15 at 07:38
  • @VonC - GitHib desktop client doesn't ask for separate stage and commit. Normally I made changes into my code and commit and take a pull and if there is no conflict. I simple push my changes to master. – Vaib Oct 22 '15 at 07:46
  • Just to be sure, could you check in command line if a `git fsck --lost-found` would help (see http://stackoverflow.com/a/14988152/6309) – VonC Oct 22 '15 at 07:50

0 Answers0