git ignore filemode config isn't working

拥有回忆 提交于 2019-12-04 14:01:58
VonC

As the OP Rana confirms in the comments, if the hook starts with:

umask 002

It will generate files with the right protection.


Alan Thompson mentions:

core.filemode only affects diffs against your working dir, not diffs between 2 commits in the repo.
So, if you have already committed the different file modes, you'll have to use filter-branch, as in "Can I make git diff ignore permission changes".

git filter-branch -f --tree-filter 'find * -type f | xargs chmod 644 ' -- --all
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!