When I copy a file over top of another file in a git controlled directory… I’m seeing git think that the whole file has changed instead of one small hunk… why?
Here is an example of what I mean… http://github.com/cmodien/fileupdatetest/commit/90309ed099e257cd98218b4504cd2cd3a3a47a27
OK… I checked the line endings on the file… The original file has crlf line endings. The file that I pasted over the original has lf line endings. Which makes sense I guess… I got the original file from a windows user and I received the new file from a mac user.
How do I fix this?
I used this to fix the problem…
Trying to fix line-endings with git filter-branch, but having no luck
I originally tried to follow this… http://help.github.com/dealing-with-lineendings/ but it was somewhat unclear that on mac/nix you need to set core.autocrlf to input and not true.
The other slight complication was that I had some files ignored in my git ignore that I needed to fix as well… so this command:
was failing… so I had to run this…
to force it to fix the ignored files as well…