DEV Community

Discussion on: How to make WSL2 even faster, with fast git

Collapse
 
dulanjala007 profile image
Chirantha Dulanjala • Edited

this is not a true solution, say you delete your wsl2 distro's ext4.vhdx, all of your project files are gone... "rmdir C:\Users<Your Windows Username>\Code /s /q" --> delete the windows side folder.
all you're doing is just making a shortcut into the wsl distro, so you can see the project files from windows explorer...
My solution for accessing my harddirves is (wsl2 sshfs:/mnt/d/) -> (wsl1 ssh server)
explaination :- light wsl1 distro (which has faster drive access by design) with ssh server, connecting to it's /mnt/(d,f,g,..) via sshfs from wsl2 distro, much faster access than direct drive access from wsl2
also for project files i have separate ext4 vhdx mounted on wsl2 distro, top speed file access, and your data is separated from the system(OS) disk, 👌 say your distro corrupted, windows had to reinstall without any back up of C: drive, no worries project files are in separate disk in a separate partition on real disk