in Web & Tech

File Mode Isssues when Moving Git Repositories From Mac to Windows

Recently I had to copy an entire Git Repository from my MacBook to a Network Share that runs on Windows. Running git status on the new location notified me of file mode changes across all my files:

old mode 100644
new mode 100755

The solution for me was to change my repository’s git configuration to filemode = false.

To do so you simply have to edit .git/config and change that line from true to false.

To prevent Git from tracking file modes in future projects you can set your global config using git config --global core.filemode false or, for more recent versions of Git, git config --add --global core.filemode false.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

To respond on your own website, enter the URL of your response which should contain a link to this post's permalink URL. Your response will then appear (possibly after moderation) on this page. Want to update or remove your response? Update or delete your post and re-enter your post's URL again. (Learn More)

  • Related Content by Tag