Created
December 2, 2020 14:37
-
-
Save organom/63bc647aeeed54632dea963770c8fe0f to your computer and use it in GitHub Desktop.
git-unset-filemode
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
git config --global --unset-all core.filemode | |
git config --global core.filemode false | |
find . -name .git -type d -exec sh -c '(cd {}; cd ..; git config --unset-all core.filemode; git_temp=`git status -s`; if [ -n "${git_temp}" ]; then (echo $PWD && git status -s && echo); fi;)' \; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When I copied my full git directory from a linux machine to windows I faced the issue of
old mode / new mode
. This script sets the global ignore and then goes over all git directories on the current path and removed any local set core.filemode (since they override the global set). Run inside WSLIts also probably useful to set the crlf:
and add the
git config --unset-all core.eol
to the script