Alexey Korepanov
by Alexey Korepanov
~1 min read



My Mac has quite a small internal SSD and I use an external SSD to keep my source code.

Once you checkout your git repository to the external drive you might notice that all files are now marked as modified. If you do git diff you will see something like this:

diff --git a/ b/
old mode 100644
new mode 100755

It usually happens if your external drive uses a file system which doesn’t support file attributes. In my case it was exFat file system:

exFat SSD

One way to fix it is to tell git to ignore the file attributes.

Run the following command to start ignoring them in the current git repository:

git config core.fileMode false

You can check your current setting by running

git config core.fileMode

This setting is stored in your .git/config file and as an alternative, you can modify it there directly.

And of course you can change it globally with

git config --global core.fileMode false

Please note than global setting will not apply to the existing repositories, but only to the new cloned or initialized repositories.