Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to not use Trash bin #10445

Open
danielb987 opened this issue Aug 25, 2020 · 13 comments · May be fixed by #17436
Open

Add option to not use Trash bin #10445

danielb987 opened this issue Aug 25, 2020 · 13 comments · May be fixed by #17436

Comments

@danielb987
Copy link

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.

@tierninho
Copy link
Contributor

@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.

Screen Shot 2020-08-25 at 2 11 23 PM
Screen Shot 2020-08-25 at 2 11 47 PM

We welcome any comments for users about changing this, but for now the issue will be closed.

@danielb987
Copy link
Author

@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
Copy link
Contributor

Ah, gotcha. Will reopen so others can comment. 👍

@tierninho tierninho reopened this Aug 26, 2020
@danielb987
Copy link
Author

Thanks!

@aryabchenko
Copy link

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
Copy link

MichaIng commented Sep 12, 2021

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.

@AdityaSavara
Copy link

AdityaSavara commented 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
Copy link

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
Copy link
Contributor

Some users may find this system setting on Windows useful.

image

@MichaIng
Copy link

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.

@aminya
Copy link
Contributor

aminya commented Sep 22, 2023

Is this why discarding takes so much time making it unusable?
#7155

@aminya
Copy link
Contributor

aminya commented Sep 25, 2023

Made the pull request #17436, which fixes this issue.

@danielb987
Copy link
Author

Made the pull request #17436, which fixes this issue.

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
8 participants