Problem: modify the entire file git commit code but actually just modifying some
reasons: because git line break leads to
Unix / Linux using LF, Mac also uses the late LF, but Windows has been using CRLF
needs in a configuration file adding configure
[Core]
autocrlf to false =
the fileMode to false =
safecrlf to true =
[1]
autocrlf = true indicates when submitting claim git crlf converted to lf, and when the detected crlf converted to lf.
autocrlf = false indicates not convert the submission and detecting code
autocrlf = input indicates when submitting the crlf converted to lf, the conversion is not detected in
[2]
# refuse submission contains mixed newline
git config --global core.safecrlf true
# Allowed to submit documents with mixed newline
git config --global core.safecrlf false
Warn when submitting documents contain a mixture # newline
git config --global core.safecrlf warn
[3]
filemode file permissions
regardless of file permissions #diff is true, is not considered to be false
core.filemode = to true | false
us through this parameter to decide whether permission diff file, if the source code, you can turn off this option, if a script, binary, etc. require certification authority like or to turn this parameter:
config core.filemode false git
.git next change after the completion of cat / config will find the parameters changed.