2

GitHub Desktop has this feature to discard all changes (non-committed, non-stashed) at once, and it works fine. When you discard changes in GitHub Desktop, all changes (or rather should I say all files containing changes) on a currently checked-out branch will be moved to the recycle bin, which is also a pretty nice feature (creating a backup for you in case you regret the discard operation and want your changes back).

But, sometimes I don't want my files in the recycle bin, I just need them discarded.
Q: Is it possible to discard files without moving them to the recycle bin?

I have multiple reasons for this:

  1. The discard operation takes very long time to finish
  2. After the discard operation is done, I find myself deleting the discarded files from the recycle bin manually (I keep my backups (kind of) in the recycle bin, so emptying it completely is not an option).
  3. When switching between branches with different .gitignore setup I need to discard changes first so I can start working on the selected branch.
  4. One of possible workarounds is to delete the branch and checkout again (which also takes too much time).

If not possible in GitHub Desktop, how can it be done in git?

Discard all changes at once using GitHub Desktop
Discard all changes in Github Desktop (Mac)

Semi
  • 93
  • 7

1 Answers1

0

A custom option like this isn't likely something GitHub will implement.

See: https://github.com/desktop/desktop/issues/15293

user3223162
  • 413
  • 1
  • 4
  • 6