git diff prompts that the filemode has changed (old mode 100644, new mode 10075)

Today, I checked git status before submitting the code, and found that all the files under each git repository are red, why are you crazy? I can't change that much~~

git diff a bit and found that all

diff --git a/Android.mk b/Android.mk
old mode 100644
new mode 100755

It turned out to be a change in filemode. After the file is chmod, some bits of the file have changed. If you strictly compare the original file and the file after chmod, the two are different, but the source code usually only cares about the text content, so chmod generates changes should be ignored, so set this:

Cut to the root directory of the source code,

repo forall -c git config core.fileMode false


This way all your git repositories will ignore filemode changes~

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326489727&siteId=291194637