SH | Diensttagebuch

In the middle of the desert you can say anything you want

09 Nov 2021

211109-1539 Git tracks executable bit of files

Git doesn’t track permissions, except whether the file is executable for the current user. 1

To recursively set all files (but not directories, because then you can’t ls them…) to not-executable:

find . -type f -print0 | xargs -0 chmod -x

To unset this for current repo (--global to unset this globally):

git config --local core.fileMode false

  1. How Git Treats Changes in File Permissions. | by Tah Teche | Medium ↩︎

Nel mezzo del deserto posso dire tutto quello che voglio.