Github Commit and Sync Deleted All Files - All work lost

后端 未结 1 958
失恋的感觉
失恋的感觉 2021-01-17 02:04

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

相关标签:
1条回答
  • 2021-01-17 02:42

    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.
    0 讨论(0)
提交回复
热议问题