Xcode says “Uncommitted Changes” Whenever I try to git pull or push

风格不统一 提交于 2019-12-05 02:02:57

Normally you don't want to put the *.xcuserstate and *.xcuserdata files into your Git repository. These files aren't really part of your project, but are just a place where Xcode stores its local information that is helpful when reloading your project.

You can fix this by using:

git rm --cached *.xcuserstate *.xcuserdata

and then committing the result. This will remove those files from the repository without removing them from your working directory.

If this is a settings file which is different for every developer, you probably don't need to version control it, just remove it from Git.

If that is not an option, you can Git Stash Save your changes before pulling and Git Stash pop to apply them again.

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