Github Commit and Sync Deleted All Files - All work lost

若如初见. 提交于 2019-12-01 12:48:41

问题


I am using Sublime text and a Github plugin.

When I tried to Commit and Sync it reverted all my files to the version in the online (from three days ago).

The commit is not showing up in the history.

Is there any way that I can get my files back?


回答1:


The problem is that you might not have added your modification to the index before making:

  • your "commit" (which committed nothing as a result) and
  • your sync (which might have reset your index to the latest fetched commit)

It is always preferable, in case of trouble, to fallback to the command line and check:

  • git status to see where you currently are after the sync,
  • git reflog, to see if there is any old commit with a timestamp that could indicate one that you did,
  • git fsck --full --unreachable --no-reflog, to see if you had added anything to the index that might be restored.


来源:https://stackoverflow.com/questions/26790666/github-commit-and-sync-deleted-all-files-all-work-lost

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!