Skip to content

Nightmare scenario: 3 months worth of changes discarded -- any way to restore them? #144519

Discussion options

You must be logged in to vote

1. Check GitHub Desktop's History and Reflog

GitHub Desktop itself doesn't keep backups of discarded changes, but the underlying Git system may have a way to restore them via the reflog (a record of changes in Git). Here's how to try to recover them:

  • Open Git Bash: You’ll need to use Git Bash for this recovery process.

  • Check the Reflog: Run the following command in your project directory (where the repository is located):

    git reflog

    The reflog keeps a record of all recent changes, even those that are not committed, and should include entries for the changes you discarded. You should look for any recent commits or changes that were discarded.

  • Restore the Changes: If you find the comm…

Replies: 1 comment 2 replies

This comment was marked as off-topic.

@edmundweir
Comment options

@queenofcorgis
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Repositories The core of version-controlled code storage Question
3 participants