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
I never ever use the trash bin on either Windows or Linux. I always delete files directly. But when GitHub Desktop discards changes, it moves the old file to the trash bin and therefore forcing me to empty the trash bin.
There is two problems with this:
Since I never use the trash bin, I don't realize that the trash bin is filled with a lot of files
Sometimes, on Linux, the trash bin makes the computer slow down if it contains a lot of files
I would like an option to never use the trash bin, so that "discard changes" does exactly that, discards them without the possibility to get them back.
Reacted by stuarts-exmos, Amin Ya, Mr Beedell, Roke Julian Lockhart, Jan Kristian Bjerke, Myned and A-pZ
@danielb987 Thank you for the suggestion. I believe our intention is not to permanently delete the files but to actually just put them in the trash. I would have to say it is better to error on the side of caution and the trash can idea was the right call.
We have had multiple issues where files were recovered because of this. I'd hate to not be able to help those users.
In the screenshots, you can see both Discard Files and Remove Repo mention the Trash.
We welcome any comments for users about changing this, but for now the issue will be closed.
@tierninho
Thanks for your comment, but it seems that you haven't understand my suggestion.
I want the option to get the files deleted at once instead of moving them to the trash. I agree that the default should be to move the files to the trash, but I want the possibility to get the files deleted at once.
Same here, discarding changes on a large repository takes much too long when a simple git reset --hard would do it. I would even suggest to make this the default: Git doesn't have a trash bin. A simple checkbox like shown above when removing a repository should however be pretty fine.
I agree with the suggestion here. Without seeing this thread, I had made a very similar suggestion on another thread with a related issue: #7155
I want to emphasize that I would prefer a popup for us to decide each time rather than something buried in settings. Because I think sending the discards to trash/recycle is not intuitive and I would not have known what was occurring without reading the issues threads. A popup box with the possibility to "remember my choice" would be a good way to put it in settings if github desktop developers feel this should be a setting rather than a popup each time.
Just another factor to consider here... There is a potential security risk/vulnerability in moving files to the recycle bin. Let me give a couple of example scenarios...
While reviewing the changes before making a commit, a developer realizes that he inadvertently included a real credit card number in his testing code. He discards the change, then goes back and rewrites the test using test card numbers. What he didn't realize is that this credit card number is now sitting in plain text on his computer hard drive, and could potentially be there for a long period of time.
Another developer discovers that his computer was compromised through a phishing attack. Forensics determines that customer PII was found on his computer even though the developer is sure that he never committed code containing PII. (The customer information was discovered in the recycle bin from some spreadsheets that had been discarded from GitHub Desktop.) This creates a huge legal issue with serious ramifications for the company.
Other potential cases would be non-disclosure agreements or malware components. Essentially, it just seems risky to have no way to turn off the sending of these files to the recycle bin. (For the record, I think it is a great feature, and agree that it should definitely be on by default. I just agree that there should be a way to turn it off in environments dealing with more sensitive data.)
Some users may find this system setting on Windows useful.
Of course, but whether one want's GitHub desktop to not move everything to trash when deleting repos or discarding changes, is a very different thing to whether one wants the Windows Explorer to use the trash bin on file deletion.
Reacted by Adam Waller, tidy-dev, Amin Ya and A-pZ
Activity
tierninho commentedon Aug 26, 2020
@danielb987 Thank you for the suggestion. I believe our intention is not to permanently delete the files but to actually just put them in the trash. I would have to say it is better to error on the side of caution and the trash can idea was the right call.
We have had multiple issues where files were recovered because of this. I'd hate to not be able to help those users.
In the screenshots, you can see both
Discard FilesandRemove Repomention the Trash.We welcome any comments for users about changing this, but for now the issue will be closed.
danielb987 commentedon Aug 26, 2020
@tierninho
Thanks for your comment, but it seems that you haven't understand my suggestion.
I want the option to get the files deleted at once instead of moving them to the trash. I agree that the default should be to move the files to the trash, but I want the possibility to get the files deleted at once.
tierninho commentedon Aug 26, 2020
Ah, gotcha. Will reopen so others can comment. 👍
danielb987 commentedon Aug 26, 2020
Thanks!
aryabchenko commentedon Jul 22, 2021
I also want such an option, cause it takes forever on my system to discard hundreds of files (cause they are moved to trash)
MichaIng commentedon Sep 12, 2021
Same here, discarding changes on a large repository takes much too long when a simple
git reset --hardwould do it. I would even suggest to make this the default: Git doesn't have a trash bin. A simple checkbox like shown above when removing a repository should however be pretty fine.AdityaSavara commentedon Nov 9, 2021
I agree with the suggestion here. Without seeing this thread, I had made a very similar suggestion on another thread with a related issue: #7155
I want to emphasize that I would prefer a popup for us to decide each time rather than something buried in settings. Because I think sending the discards to trash/recycle is not intuitive and I would not have known what was occurring without reading the issues threads. A popup box with the possibility to "remember my choice" would be a good way to put it in settings if github desktop developers feel this should be a setting rather than a popup each time.
joyfullservice commentedon Feb 25, 2023
Just another factor to consider here... There is a potential security risk/vulnerability in moving files to the recycle bin. Let me give a couple of example scenarios...
While reviewing the changes before making a commit, a developer realizes that he inadvertently included a real credit card number in his testing code. He discards the change, then goes back and rewrites the test using test card numbers. What he didn't realize is that this credit card number is now sitting in plain text on his computer hard drive, and could potentially be there for a long period of time.
Another developer discovers that his computer was compromised through a phishing attack. Forensics determines that customer PII was found on his computer even though the developer is sure that he never committed code containing PII. (The customer information was discovered in the recycle bin from some spreadsheets that had been discarded from GitHub Desktop.) This creates a huge legal issue with serious ramifications for the company.
Other potential cases would be non-disclosure agreements or malware components. Essentially, it just seems risky to have no way to turn off the sending of these files to the recycle bin. (For the record, I think it is a great feature, and agree that it should definitely be on by default. I just agree that there should be a way to turn it off in environments dealing with more sensitive data.)
tidy-dev commentedon Feb 27, 2023
Some users may find this system setting on Windows useful.
MichaIng commentedon Feb 27, 2023
Of course, but whether one want's GitHub desktop to not move everything to trash when deleting repos or discarding changes, is a very different thing to whether one wants the Windows Explorer to use the trash bin on file deletion.
aminya commentedon Sep 22, 2023
Is this why discarding takes so much time making it unusable?
#7155
aminya commentedon Sep 25, 2023
Made the pull request #17436, which fixes this issue.
danielb987 commentedon Sep 25, 2023
Thank you!
Option to delete discarded files instead of trashing
Option to delete discarded files instead of trashing
Option to delete discarded files instead of trashing