In WSL (Ubuntu 18.04) git shows unwanted unstaged changes sometimes.
If you perform git diff
on the files, you can see that only file permissions have changed, e.g:
old mode 100755
new mode 100644
Fix:
Add these lines to /etc/wsl.conf
:
[automount]
options="metadata"
Then run wsl --terminate <distroname>
Then start WSL again
Sources:
https://www.reddit.com/r/bashonubuntuonwindows/comments/ovmlk3/unable_to_change_permissions_of_a_file_using/
https://stackoverflow.com/questions/1257592/how-do-i-remove-files-saying-old-mode-100755-new-mode-100644-from-unstaged-cha
#wsl #git #filepermissions #chmod #unstaged #changes