Feature request: 'Discard selected changes' in the context menu
See original GitHub issue-
Is your feature request related to a problem? Please describe. If you have multiple modified files, but for some reason you want to discard changes on a subset of these files, you have no option. Context menu provides either Discard changes, which discards changes in the file you right-clicked, or Discard all changes, which discards all currently discovered changes. Both options ignore your selections made by checking check-boxes.
-
Describe the solution you’d like
- Add a context menu item Discard selected changes (or any other appropriate clear name), which performs discard operations on selected (using check-boxes) files. Add a confirmation dialog that cannot be disabled (as operation is performed on, possibly, a large amount of files at the same time). -OR-
- Change functionality of Discard all changes to Discard all selected changes and use check-box selections. This way current Discard all changes operation can be performed by first, selecting all files and second, clicking appropriate menu item.
-
Describe alternatives you’ve considered
- Manually discarding files one by one. Works if you have a few files in your Changes and you want to discard changes only in part of those files
git checkout -- <pattern>
-
Teachability, Documentation, Adoption, Migration Strategy
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Message - Are you sure you want to discard the changes in ...
This message is shown when you select one or more files in the Commit dialog, right-click the selected file(s) and choose Revert from...
Read more >Undo changes in Git repository | IntelliJ IDEA Documentation
In the Log view select the commit containing the changes you want to discard. · In the Changed Files pane, right-click the file...
Read more >Customize list context menus
Customize list context menus ; Order, Assign an order number to this item, menu, or separator to specify where in the menu it...
Read more >Work with PDFs — Acrobat for Android Help - Adobe
open a context menu displaying additional options based on your service subscriptions. ... To discard your changes, select X from the top bar....
Read more >Using modern comments in Word - Microsoft Support
Note: This feature is currently available in Word for the web for all users. ... Right-click any text and select New comment in...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @Ilia-Kosenkov, thanks for opening this.
You should be able to select more than one file by Shift/Control clicking on them and then right clicking and selecting ‘Discard selected changes’.
This change shipped in the latest release (1.2) so make sure you’re up to date by going to the Help menu and selecting ‘About GitHub Desktop’.
Please let me know if that doesn’t work or if there’s a reason you aren’t able to use that feature.
@amoyano Sorry for the confusion. The check boxes are not for deleting. The check boxes represent which files are staged for commit or not. You can delete as you show in your screenshot.
Example of checkbox use. Modify 3 files, but only want to commit 2 of those changes. You simply uncheck the file you don’t want to commit. Type your summary/description and commit. The unchecked file will remain in your changes list.