Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Would like a Discard All option #611

Closed

Description

@damieng

Unstaged Changes title bar where Stage All lives is a bit crowded already. Maybe either right-clicking Stage All to see a Discard All menu button or holding down alt to see the text change from Stage All to discard all? Thoughts @simurai

Activity

  1. simurai commented on Mar 16, 2017

    @simurai
    Contributor

    Yes, please. 🙇 How about:

    • Right-clicking the header shows: Discard All Changes
    • Right-clicking a file shows: Discard Changes

    That way they would never show together in the same context menu and there is less chance you would pick the wrong one by accident.

    Also, a github:discard-all command would be handy. So it can be used without having to open the Git panel. For example when switching branches and you where just testing something and don't need the changes anymore.

    Probably a concern is how to undo that?

    • If the files are open, you can cmd-z to undo.
    • Have a confirm dialog? But they are also annoying 99% of the time.
    • Maybe once we have stashing stash #557, we could auto-stash every time you "discard all". It would override the last auto-stashed changes (to not clutter up the stash list). Kinda like an auto-save in games.
  2. cbovis commented on May 19, 2017

    @cbovis

    Agreed that there needs to be a confirmation when discarding all changes, especially when called directly via the command palette. I personally wouldn't find a confirmation dialog which gave me the option to destroy or stash my changes. I feel like stashing automatically would annoy me more as I'll then have to manage those stashes at a later point. More often than not if I'm discarding then thats really what I want to do, stashing for me is an explicit action.

    I think the key to confirmation dialogs is using them for only the most destructive of actions, the kind of actions where selecting that action by mistake could be painful.

  3. simurai commented on May 20, 2017

    @simurai
    Contributor

    I feel like stashing automatically would annoy me more as I'll then have to manage those stashes at a later point.

    Yeah, that would get messy quickly. I was more thinking that auto-stashing would override your old auto-stash. So there would be your manual stashes and only one extra auto-stash. This also means that you can only recover your last "discard all".

  4. cbovis commented on May 24, 2017

    @cbovis

    I just used the individual file discard option within the package for the first time today and realised that there's actually an Undo Discard option built in already. I've not looked into the implementation yet (it doesn't appear to create a stash) but I suspect that could be used to revert any Discard All changes as well...

    discard

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions