If you clone a git repo into /mnt/c
, then you will get 777
permissions on everything.
SourceTree will complain with:
git log failed with code 128 detected dubious ownership ...
And then a command for getting the specific directory and marking it as safe.
Here's the fix, run this in SourceTree's Terminal (aka git_bash.exe
) on the Windows side, not WSL.
git config --global safe.directory '*'
Install the WSL extension in VSCode, relaunch the folder appropriately, and done. No more weird git diffs.