Git pull error: Your local changes to the following files would be overwritten by merge:

前端 未结 5 947
没有蜡笔的小新
没有蜡笔的小新 2020-12-13 09:21

I am trying to pull changes from remote branch but getting an error which doesn\'t make sense

when I do

git pull

I get back

<
5条回答
  •  执念已碎
    2020-12-13 10:25

    Had the same issue. Solved it by re-cloning the repo. But now I think that the reason was the line endings in these files. I played with them before.

    I suppose that line-ending difference doesn't mark files as changed, but may lead to this message. When you rm the files and recheckout them, line endings should set to "good state", and pull goes fine.

提交回复
热议问题