.
Git , . , Git CRLF ( ) - , , Git , , .
- Unix ( Unix Windows-). . , Unix:
C:\Temp>hexdump /C foo
00000000 68 65 6c 6c 6f 21 0a |hello!.|
00000007
( * text=auto core.autocrlf=true):
C:\Temp>git add foo
warning: LF will be replaced by CRLF in foo.
The file will have its original line endings in your working directory.
Git, (Unix-) :
C:\Temp>hexdump /C foo
00000000 68 65 6c 6c 6f 21 0a |hello!.|
00000007
Unix:
C:\Temp>git ls-files --stage
100644 4effa19f4f75f846c3229b9dbdbad14eff362f32 0 foo
C:\Temp>git cat-file blob 4effa19 | hexdump /C
00000000 68 65 6c 6c 6f 21 0a |hello!.|
00000007
Git , - CRLF, :
C:\Temp>del foo
C:\Temp>git checkout -f foo
C:\Temp>hexdump -C foo
00000000 68 65 6c 6c 6f 21 0d 0a |hello!..|
00000008
, , , . , , , , .