- on your repo's root, run :
find . -type f | xargs chmod -x
- commit this change on files :
commit -n -m 'fix: files permission from 100755 to 100644'
- then with
vim .git/config
, setfilemode
option tofalse
[core]
filemode = false
Thanks! Saved a ton of time!
thanks for this, if you are on ubuntu, xargs command would be like this:
find ~ -type f -print0 | xargs -0 chmod -x
This is dangerous!
find ~ -type f -print0 | xargs -0 chmod -x
Please change it to find . -type f -print0 | xargs -0 chmod -x
because your current command is executed for each file in your home directory
Thanks for the gist, you saved me a lot of time.