To discard changes on a single file in GitHub Desktop, right click on it in the left pane. Then, click on the Discard changes… option that appears.
To discard changes to all of the files that haven’t been committed yet, go to Branch > Discard all changes… in the menu bar. A dialog box will appear asking for confirmation.
You can restore your discarded changes by going to your Trash on macOS or your Recycle Bin on Windows.