How can I discard all changes at once in GitHub Desktop? (I use it on Windows)
I used to do:
but can't see the option any more since GitHub for Windows upgraded itself silently (and changed its name to GitHub Desktop on the way).
I don't want to do it manually for each file one by one. I know I can use the git shell.
I use the latest version of GitHub Desktop, viz. 3.0.1.1.
In GitHub Desktop, click Current Branch. At the top of the drop-down menu, click Pull Requests. In the list of pull requests, click the pull request you want to view. Optionally, to refresh the list of pull requests, click .
There are two Git commands a developer must use in order to discard all local changes in Git, remove all uncommited changes and revert their Git working tree back to the state it was in when the last commit took place. The commands to discard all local changes in Git are: git reset –hard. git clean -fxd.
Super easy - Select your repository in the leftmost column and then click "Uncommitted Changes" in the 2nd column to display your changed files at the right. If you right-click on any file you'll have an option to "Discard changes".
I found it... now we need to right-click precisely on the "X changes" text in blue:
On GitHub Desktop for Mac v2.17: Menu Bar > Repository > Discard Changes to Selected Files
.
Related issues:
This ought to be just a comment, but I thought a screenshot of current looks might be useful. So to add to Franck's excellent answer:
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