Repository navigation
Description
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
- Clone a repository to a WSL path
- Create a new file in the repository
- Try to discard the newly created file with Github Desktop
- 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
Activity
sergiou87 commentedon Mar 28, 2022
Thanks for your report @j0nm1!
Did this ever work in previous versions of GitHub Desktop? (namely on 2.9.6 and older)
j0nm1 commentedon 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.
steveward commentedon Mar 29, 2022
I was able to reproduce this as well. Discarding changes in a mapped network drive works without issue.
Squadz commentedon 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 commentedon Apr 29, 2022
Same behavior here
Running windows 11 with wsl2
Github Desktop 2.9.16-beta2
dev-cadet commentedon 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
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 commentedon Oct 22, 2023
Could this be the reason?
steveward commentedon Oct 23, 2023
@ms-afk thanks for sharing that, I'll make a note to look into that this week!
NibrasAbuAyyash commentedon Nov 9, 2024
Hi,
The problem still occurs with the latest version of GitHub Desktop, Ubuntu 24.04, and WSL 2 with Docker Desktop.
Is there a solution to the problem? Every time I need to delete it from VS Code or File Manager.
C0rn3j commentedon Nov 19, 2024
Yes, the solution seems to be to pull #16378, which itself needs desktop/dugite#532.
I see @niik working on a 3.0.0rcs of Dugite, any chance the PR can make it in there for 3.0.0, to get this rolling?
aleixrodriala commentedon Mar 26, 2026
I've been struggling with this for a while and ended up building a fork that fixes it: GithubDesktopWSL
Think of it like the VS Code Remote WSL extension but for GitHub Desktop. It runs a small daemon inside WSL that handles git and file operations natively over TCP instead of going through 9P.
I went with a patch-based approach so it auto-syncs with upstream releases. You can just download the installer and try it, installs side-by-side with official Desktop.
Would love if anyone here could give it a try and let me know how it goes!