3 ms·
> `git` generally doesn't work with lines of text. Mostly it works with opaque file blobs and directory trees. I am not sure this is true. In the past it gave
by rileymat2 5y ago
> `git` generally doesn't work with lines of text. Mostly it works with opaque file blobs and directory trees.
I am not sure this is true.
In the past it gave me problems with line ending normalization between windows/mac/linux, in and out. In those cases it definitely had a lines of text view of things.
- ajanuary 5y agoGit is delegating to the diff to work out how to merge the blobs. It's the diff that is having trouble with the line endings.
- rileymat2 5y agoNo, in the past, git would change line endings. A check in on one machine and a check out on another machine would give different files.
- Ajedi32 5y agoIt is generally true, but yes; automatic line ending conversion is an exception. You can turn it off with `git config --global core.autocrlf false`, though be aware that can cause issues if you have developers on different operating systems creating and committing files with different line endings.