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

Still unable to discard changes on Windows using WSL #14244

Open
1 task done
j0nm1 opened this issue Mar 28, 2022 · 9 comments
Open
1 task done

Still unable to discard changes on Windows using WSL #14244

j0nm1 opened this issue Mar 28, 2022 · 9 comments
Labels
bug Confirmed bugs or reports that are very likely to be bugs priority-3 Bugs that affect small number of users and/or relatively cosmetic in nature windows Issues specific Desktop usage on Windows

Comments

@j0nm1
Copy link

j0nm1 commented Mar 28, 2022

Search existing issues

  • I have searched the issue tracker and confirmed that I was unable to find existing issues for the problem I am experiencing.

The problem

I have cloned a repository on a Windows 11 WSL2 drive (\wsl.localhost\Ubuntu\home...). Then I have created a new file by mistake and I want to discard it. Github Desktop is not able to discard the newly added file (but I can discard changes in files that are already tracked).

When I click the discard changes button, I get the error message that it "Failed to discard changes to Recycle Bin." (which is expected). But after clicking on "Permanently discard changes" it still does not delete the file. After a short loading period, the modal closes itself but the file is still there.

There are no errors in the logs and this is not a permission problem (as I can delete those files manually without any problems)

Release version

2.9.12

Operating system

Windows 11

Steps to reproduce the behavior

  1. Clone a repository to a WSL path
  2. Create a new file in the repository
  3. Try to discard the newly created file with Github Desktop
  4. The file is still there

Log files

2022-03-28T12:27:12.451Z - info: [ui] [AppStore] loading 5 repositories from store
2022-03-28T12:27:12.453Z - info: [ui] [AppStore] found account: j0nm1 (Jonas Michaelis)
2022-03-28T12:27:12.464Z - info: [ui] [BranchPruner] Last prune took place in 1 hour - skipping
2022-03-28T12:27:12.980Z - info: [ui] launching: 2.9.12 (Windows 10.0.22000)
2022-03-28T12:27:12.982Z - info: [ui] execPath: 'C:\Users\Jonas\AppData\Local\GitHubDesktop\app-2.9.12\GitHubDesktop.exe'
2022-03-28T12:27:12.989Z - info: [ui] Subscribed 'j0nm1' to Alive channel
2022-03-28T12:27:18.240Z - info: [ui] No submodules found. Skipping "git submodule status"
2022-03-28T12:27:19.160Z - info: [ui] No submodules found. Skipping "git submodule status"

Screenshots

No response

Additional context

No response

@sergiou87
Copy link
Member

Thanks for your report @j0nm1!

Did this ever work in previous versions of GitHub Desktop? (namely on 2.9.6 and older)

@sergiou87 sergiou87 added the more-info-needed The submitter needs to provide more information about the issue label Mar 28, 2022
@j0nm1
Copy link
Author

j0nm1 commented Mar 28, 2022

I just downloaded Version 2.9.6 to try it out. It's exactly the same (but without the confirmation modal), newly created files cannot be discarded. There is no error, the file just doesn't get deleted. Nothing in the logs.

@no-response no-response bot removed the more-info-needed The submitter needs to provide more information about the issue label Mar 28, 2022
@sergiou87 sergiou87 added bug Confirmed bugs or reports that are very likely to be bugs priority-3 Bugs that affect small number of users and/or relatively cosmetic in nature labels Mar 28, 2022
@steveward
Copy link
Member

I was able to reproduce this as well. Discarding changes in a mapped network drive works without issue.

@say25 say25 added the windows Issues specific Desktop usage on Windows label Apr 17, 2022
@Squadz
Copy link

Squadz commented Apr 23, 2022

Same, I'm unable to discard for any files located in WSL (Win11)

I have a similar behavior when I try to ignore a file (add to .gitignore) in WSL.

Github Desktop v2.9.16-beta1

@zedd3v
Copy link

zedd3v commented Apr 29, 2022

Same behavior here

Running windows 11 with wsl2

Github Desktop 2.9.16-beta2

@ghost
Copy link

ghost commented May 20, 2022

Nothing related with github desktop, I just want to said other IDE git also get the same problems with WSL.
File just stay there, no matter how many time use the discard of IDE ( like VSCode, Goland...)
Could be related to microsoft/WSL#2222

@harley-codes
Copy link

harley-codes commented Jul 27, 2023

I am also experiencing this issue. GitHub Desktop version 3.2.6

If this helps, using dev tools you can see the following console log from install.ts

  • No submodules found. Skipping "git submodule status"

So this looks like a git issue instead?

** EDIT **
I just successfully discarded it while I had the project open in VS Code via WSL. I hope this finds usefull for whoever is investigating :)

@ms-afk
Copy link

ms-afk commented Oct 22, 2023

Could this be the reason?

@steveward
Copy link
Member

@ms-afk thanks for sharing that, I'll make a note to look into that this week!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Confirmed bugs or reports that are very likely to be bugs priority-3 Bugs that affect small number of users and/or relatively cosmetic in nature windows Issues specific Desktop usage on Windows
Projects
None yet
Development

No branches or pull requests

8 participants