Skip to content

Allow discarding of selected changes #2481

Closed

Description

@rthery

Description

I often find myself wishing for more granularity in discarding changes. Right now you can either discard changes file by file or discard them all. It would be nice to have a second option when right-clicking the header such as "Discard selected changes...", where it would discard only changes from the selected files in the list.

Version

GitHub Desktop version: 0.8.0

OS version: Microsoft Windows [version 10.0.15063]

Activity

  1. shiftkey commented on Aug 17, 2017

    @shiftkey
    Member

    @rthery thanks for the feedback!

    It would be nice to have a second option when right-clicking the header such as "Discard selected changes...", where it would discard only changes from the selected files in the list.

    This is currently where "Discard All Changes" resides:

    I think this belongs as part of #1712 because the real limitation at the moment is the fact that multiple files cannot be selected. I think if you can select multiple files then having "Discard Changes" in the context menu feels more discoverable than the header approach.

    @rthery I've added this comment to that issue.

  2. rthery commented on Aug 17, 2017

    @rthery
    Author

    Sounds good, thank you @shiftkey!

  3. varkor commented on Apr 11, 2018

    @varkor

    @shiftkey: considering you can select (toggle) files using the checkboxes, why not simply use that for "Discard selected files..." from the header menu?

  4. locked as resolved and limited conversation to collaborators on Jul 17, 2018
  5. unlocked this conversation on Sep 27, 2018
  6. amerikan commented on Oct 2, 2018

    @amerikan

    How can I discard the files that are ONLY SELECTED? I find myself trying do discard several files, but at the same time I also want to keep some. In the old Github desktop app, I remember I could do it.

    Example:

    I have 5 files with changes. I want to only discard 3 files and keep the other 2 intact. If I select only the 3 files and click on Discard All changes, it prompts to discard everything instead of just offering to discard the 3 selected files.

    Is this possible or am I just using it wrong?? Thanks!

    Using: v1.4.1

    Update: adding screenshot

    screen shot 2018-10-02 at 2 27 43 pm

  7. j-f1 commented on Oct 2, 2018

    @j-f1
    Contributor

    You have to use Cmd/Ctrl/Shift+click to select multiple files (not the checkbox, the whole row), then choose “Discard X files.”

  8. amerikan commented on Oct 2, 2018

    @amerikan

    @j-f1 pretty counter intuitive way to do it, alas it worked so thanks.

  9. ionut-sultana commented on Apr 19, 2021

    @ionut-sultana

    @j-f1 Thanks!

  10. ajtruckle commented on Feb 28, 2025

    @ajtruckle

    What about ability to discard changes to a selected set of lines or code? Possible?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions