GitHub for Mac sync deleted my uncommitted changes

后端 未结 3 688
离开以前
离开以前 2021-01-02 10:36

I use GitHub for Mac version 210 on Mac OS X 10.10. Hitting the \"sync\" button deleted my uncommitted changes. Is that supposed to happen from time to time? I\'ve never had

相关标签:
3条回答
  • 2021-01-02 11:16

    The Github Desktop creates an stash with your changes.

    You can list the stashes with:

    git stash list
    

    And apply the one that Github Desktop created by doing:

    git stash apply stash@{0}
    

    For more information about git stash see this.

    0 讨论(0)
  • 2021-01-02 11:16

    It did happen before (even for GitHub for Windows).

    For added changes to the index, a git fsck --full --unreachable --no-reflog could help (as I mentioned here)

    0 讨论(0)
  • 2021-01-02 11:18

    Command line is the way to go. I faced the same situation. When I did a stash list in the Terminal it showed me "GitHub: Stashing to pull in remote changes". And I was able to retrieve my local uncommitted changes back again. :)

    0 讨论(0)
提交回复
热议问题