question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

the new dangerous 'Discard All Changes' option

See original GitHub issue

Description

‘Discard All Changes’ option is not safe at the moment, because of the following:

  1. It is very easy to click it instead of ‘Discard Changes’ (single file)

  2. No confirmation dialog appears when we click ‘Discard All Changes’ (provided that we’ve chosen to avoid these confirmation dialogs)

Version

  • GitHub Desktop: version 1.1.1
  • Operating system: Windows 10 64 bit

Steps to Reproduce

  1. when you have uncommitted changes - click on ‘Changes’ tab on the left
  2. right click on any file
  3. you can see the standard ‘Discard Changes’ option
  4. you can also see the dangerous ‘Discard All Changes’ option which is located extremely close to the previous one.
  5. discard single file by clicking ‘Discard Changes’ option
  6. confirmation dialog appears - you can see ‘Do Not Show This Message Again’ checkbox
  7. tick the checkbox and click on ‘Discard Changes’ button
  8. try discarding all files by clicking ‘Discard All Changes’ option
  9. result - you’ve lost all your changes (perhaps even the important ones) which could be easily avoided if confirmation dialog was mandatory when discarding all changes.

Expected Behavior

Even if we’ve chosen to avoid confirmation dialog when reverting single file (‘Discard Changes’ option), the ‘Discard All Changes’ one is supposed to cause the confirmation dialog to appear anyway, because we risk losing all uncommitted changes.

Secondly, the ‘Discard All Changes’ option should be located a few menu items away from the ‘Discard Changes’ one.

Actual Behavior

If we’ve chosen to avoid the confirmation dialog, when reverting single file - the dialog also does not appear when reverting all changes, thus the new functionality is kind of a trap both for novice and experienced GitHub Desktop users.

Additional Information

The ‘Discard All Changes’ option is absolutely necessary, so please do not remove it.

Thanks in advance!

Logs

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:6
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

4reactions
iAmWillShepherdcommented, Apr 10, 2018

@desktop/design How do you all feel about forcing the confirmation dialog to appear, irrespective of the preference being set to not show them, when discarding all changes?

1reaction
j-f1commented, Dec 3, 2018

@ideaguy3d The changed files should be in the Trash/Recycle Bin.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How do I discard unstaged changes in Git? - Stack Overflow
For all unstaged files in current working directory use: git restore . ... You can now discard unstaged changes in one tracked file...
Read more >
Undo possibilities in Git - GitLab Docs
Undo staged local changes · Confirm that the file is staged (that you used git add <file> ) by running git status :...
Read more >
Git Reset Clearly Explained: How to Undo Your Changes
In this post, we'll cover the git reset command, including how ... The hard reset is a more direct and dangerous way to...
Read more >
Solved: How to revert a Policy or discard changes?
Solved: Hello, i am looking for two important features: 1.) Use Case "dicard / revert changes" Admin1 did some changes and published them....
Read more >
2.4 Git Basics - Undoing Things
It's true that git reset can be a dangerous command, especially if you provide the --hard flag. However, in the scenario described above,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found