Qui è il mio dialogo sistema:file Git modificati dopo la partenza, il reset --hard, ecc anche se autocrlf è impostata su false
unrollme-dev-dan:views Dan$ git reset --hard HEAD
HEAD is now at 3f225e9 Fix scan titles
unrollme-dev-dan:views Dan$ git status
# On branch master
# Changes not staged for commit:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
# modified: app/signup/finish.html
# modified: app/signup/scan.html
#
devo autocrlf insieme a false:
unrollme-dev-dan:unroll-website Dan$ git config core.autocrlf
unrollme-dev-dan:unroll-website Dan$
unrollme-dev-dan:unroll-website Dan$ git config --global core.autocrlf
unrollme-dev-dan:unroll-website Dan$
E non ho alcun file .gitattributes rovinare questo in su:
unrollme-dev-dan:unroll-website Dan$ find . -name .gitattributes
[ only results are in different directory tree ]
Questo è causato da un livello .gitattributes
come indicato nella risposta di seguito.
Quando faccio un od -c
sui file mostra \r\n
. Non so che cosa "dovrebbero" essere, presumibilmente, dovrebbero finire in \n
ed è per questo che il diff sta mostrando. Ma quello che non capisco è come questi file potrebbero eventualmente essere modificati al checkout anche con autocrlf
false.
Cosa può causare git che modifica un file al checkout oltre a autocrlf?
Is core.eol set? – Ikke
core.eol non è impostato. – djechlin
Può essere un duplicato di [questa domanda] (http: // stackoverflow.it/questions/11005688/git-autocrlf-false-git-status-still-shows-modifications), non votando per chiudere finché uno di questi ha una risposta corretta che funzioni per entrambi. – djechlin