I have a git repository on a Dropbox folder, shared between a Linux machine and a Windows machine. I try to sync only on the Windows machine, because I am aware of "issues" that may arise. Occasionally I do a small commit on the Linux box, though, to track my changes,
But now I am really curious, what git is doing: Id did not touch the file fonttest.tex
, but git reports me it has been modified:
towi@havaloc:~/Dropbox/latex$ git status fonttest.tex
# On branch master
...
# modified: fonttest.tex
And the diff
lists the whole file: All lines deleted, and inserted again. Ok, probably an CRLF-issue. So I ask todos
and fromdos
to convert back-and-forth with and without CR and CRLF. But -- you guess already -- no change for git
: All lines changed.
Hmm, I thought, Since I know nothing has changed, I get a clean copy:
mv fonttest.tex fonttest.tex1
git checkout fonttest.tex
And because I am a curious person, want to see the difference:
diff fonttest.tex fonttest.tex1
nothing. Really?
towi@havaloc:~/Dropbox/latex$ md5sum fonttest.tex*
d3544bd060504ebb682b2e446375b3b3 fonttest.tex
d3544bd060504ebb682b2e446375b3b3 fonttest.tex1
Really. And what is git thinking about it?
towi@havaloc:~/Dropbox/latex$ git status fonttest.tex
# On branch master
...
# modified: fonttest.tex
Man, you just checked it out for me! What's the matter here? Why is git thinking the file has changed?
Here is an excerpt of my config. I did make some adjustements concerning CRLF, by following someones tip for Dropbox sharing. But... I just cant follow git here.
towi@havaloc:~/Dropbox/latex$ git config -l
diff.renames=copies
apply.ignorewhitespace=change
apply.whitespace=nowarn
core.whitespace=cr-at-eol
core.repositoryformatversion=0
core.filemode=false
core.logallrefupdates=true
core.symlinks=false
core.ignorecase=true
core.eol=lf
core.autocrlf=input