You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
Repository navigation
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
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
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.
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.
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".
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...
Activity
simurai commentedon Mar 16, 2017
Yes, please. 🙇 How about:
Discard All ChangesDiscard ChangesThat 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-allcommand 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?
cmd-zto undo.cbovis commentedon May 19, 2017
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.
simurai commentedon May 20, 2017
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".
cbovis commentedon May 24, 2017
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...