- Xcode报错"The working copy 'xxx' h
- 警告:warning .png is missing from
- 报错 target xxx(project 'xxx')has
- iOS开发-SVN出错 Description : The w
- 【svn错误】Description : The working
- The working copy "xxx" has uncom
- xcode 8 报警告xxxxxxxx is missing f
- Xcode 8 is missing from workin
- The working copy "xxx"
- No member named XXX in XXX

日常记录一下,Xcode使用git管理代码的时遇见的问题。
有时候想切换到其他的branch或者试图执行merge、pull、push等操作,即使未做任何修改,也会报出这个错误。这是因为Xcode下的一些状态文件的改变造成的。
解决方式:
不需要在.gitignore文件中去作忽略处理。只要在首次提交的时候.xcworkspace后缀的文件下的所有文件别做提交。如果已经提交过,可以做以下操作来解决:
1、命令行进入项目文件目录下执行下面两行代码,删除文件追踪
git rm --cached *.xcuserstate
git rm --cached *.xcuserdata
2、提交
git commit - m "Removed file that shouldn't be tracked"
3、重启Xcode push一次就好了。注意.xcworkspace后缀的文件下的所有文件别做提交
网友评论