Why did git show me this conflict when both the files were same?

This was the only conflict which I got when I did $ git stash pop
Its the last line of the file and both of which didn't have any newline in end.

Same line but still shows conflict

Is this something I don't know about git or is it some bug.
Git version 1.7.12

Upvotes: 2

Views: 115

Answers (1)

VonC
VonC

Reputation: 1329652

It seems consistent with 'git: merge conflicts over newline at end of file', and typical when the setting core.autocrlf is set to false (which I recommend), instead of 'native'.
Note that a merge will not ignore those eol differences (see "Is it possible for git-merge to ignore line-ending differences?").

If you want those eol conversion done for you automaticaly, then you could consider a .gitattributes settings, as described in "Distributing git configuration with the code".

Upvotes: 2

Related Questions