Git rebase fails, 'Your local changes to the following files would be overwritten by merge'. No local changes?

妖精的绣舞 提交于 2019-11-27 10:06:36
jhogendorn

This is the same answer as another one of my questions re git troubles.

I'm on a mac, and this obscure config change seemed to fix all my woes regarding unstaged changes when there were none.

git config --global core.trustctime false

I think it's to do with differences between windows file times, linux file times and mac file times. who knows, feel free to comment if you do.

Update: This blog post explains what's going on, sort of.

user132837

With regards to Joshua Hogendorn's answer: it seems to me that leaving Xcode open while working on the repository with git leads to these problems. It even led to a situation where git committed something that I thought to have stashed (and still had afterwards) but Xcode just wrote to the filesystem right during the rebase.

So: Close your Xcode project before you work on the repo with git if you want to be safe, and then you probably don't need the core.trustctime false setting.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!