I’m running Windows Subsystem for Linux (WSL) on Windows 10. I downloaded a Git repo under the WSL mount. I noticed that whenever I used Windows/Visual Studio Code to save files, the permissions would reset to 000. I spoke with a colleague and his setup was different than mine.
I had the Git repo inside WSL mount.
His Git repo was on the Windows/C-drive mount and he had a soft-link to the repo. He did not face the permission issue.
So after I pushed out my latest changes, I decided to move my repo. This was the easy part. I made a softlink using
ln /directory/ /linkdirectory/
However, after the repo was moved and I modified one file, it was a bit unnerving to find out that ALL the files were listed as modified. I browsed around and saw that this could’ve been due to the line-endings on Linux vs. Windows.
It wasn’t until I updated these two settings that the rotten state in Denmark became a happy state:
git config core.autocrlf true git config core.filemode false