Git Pull Not Clean

Sometimes after I git pull from the master branch, if I run git status, there are some files (for me it’s mainly xxx.dsx) are modified that need to be added and committed, that’s strange.

It seems the format issue that can be solved by editting the top level .gitattributes in your local repository. Open .gitattributes, comment out the formulas, for example:

1
#* text=auto

Now if I run git status again, the clutters are gone and git outputs only show

1
modified:   .gitattributes

Then revert back to origin in .gitattributes and run git status again, the branch will be clean.

Acutally there are some commands can exterminate editor operation:

1
2
3
4
sed -i -e 's/^\(\*[ ][ ]*text.*\)/#\1/' .gitattributes
git status
sed -i -e 's/^#\(\*[ ][ ]*text.*\)/\1/' .gitattributes
git status
0%