Is there any way to undo discard changes in GitHub Desktop, after the Undo button has disappeared?
I am talking about GitHub Desktop's undo feature, not git in general.
Nothing in Git is deleted, so when you work in Git, you can undo your work. All version control systems have options for undoing work.
Ctrl + Z or restore from trash. I have lost work to this multiple times, and to remedy this, I commit all the changes, then reset the branch to the previous commit. Then you can run git discard to discard the changes, but keep a reference in the reflog.
As of 5/8/18, and if you're using the latest version of github desktop or github desktop beta, uncommitted discarded changes are now copied over as new files and put into your trash/recycling bin.
This is what the current prompt looks like:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With