Can't exclude user interface state from commit in xcode

安稳与你 提交于 2019-12-02 15:15:30

If those files are already committed, you need to remove them from the index before seeing your .gitignore file work.

git rm --cached *.xcuserstate
# or
git rm -r --cached project.xcworkspace

To add on to VonC's answer after calling -rm you also have to commit and then push (do this in the terminal BEFORE touching Xcode or it's git tools again), that solved my problem.

So

git rm --cached *.xcuserstate
git commit -m "Removed cached files"
git push

Then you can touch Xcode again

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