Categories
Uncategorized

Git Shows That All Files Have Been Modified (mode Issue)

When I opened the (WooCommerce) project directory, I noticed a sign (lightening bolt ⚡️) in the terminal which means something has been changed.

I did a git status and noticed that every single file has been modified, except that the content of each file was the same because I had never touched those:

I did a git diff to see what’s up and I noticed that the “mode” has been changed. Looking at 644 and 755 in there, I figured this has something to do with permissions.

This can be fixed by setting filemode to false in the gitconfig file:

# For the current repository
git config core.filemode false   

# Globally
git config --global core.filemode false

Leave a Reply

Your email address will not be published. Required fields are marked *