I have seen few posts on this here in git but none so far seem to have answer.
I am having following problem. Every time I do a successful git fetch/git merge
, I see lots of files listed by git as modified in some way. Some are unstaged, while others are untracked or uncommitted.
So, even though I have not changed them, they show as somehow being modified when I do git fetch
and git merge
.
This is a problem since now, if I commit and push my changes, all these files appear as modified by me which is wrong.
I am using MacBook for my development, but other dev teams may be using Windows. So, as a first culprit to this I can think off is line endings. I checked on my Mac and git config core.autocrlf
shows input
, which as I understand should be on Mac.
Checking on Windows, shows git config core.autocrlf
as true
, which also according to my understanding is correct.
So, assuming the settings above are correct, line endings should not be the problem but I dont know how to confirm that.
Also, I dont know how to fix this issue with files that I have not modified in any way show as modified after I do git fetch
and git merge
without any conflicts.
So, my questions are
How to confirm that line-endings are or are not culprit behind this issue?
How to fix this issue?
UPDATE
It looks like not only text based files such as cs, txt, xml etc but also binary like png files are marked as modified. So, the issue is not line endings IMO or?