[英]Xcode 4 and Branches
I am using Xcode 4.5 and Git for version control. 我正在使用Xcode 4.5和Git进行版本控制。 I created a new branch and added some code to it.
我创建了一个新的分支并添加了一些代码。 When I go to Organizer/My Repository and click on switch branch, I can't switch to a branch because I get the following error message :
当我去Organizer / My Repository并单击switch分支时,我无法切换到分支,因为我收到以下错误消息:
Working copy is modified
工作副本已修改
Figured it out. 弄清楚了。 I had to remove the xcuserstate and added it to my .gitignore
我不得不删除xcuserstate并将其添加到我的.gitignore中
git rm --cached ProjectFolder.xcodeproj/project.xcworkspace/xcuserdata/myUserName.xcuserdatad/UserInterfaceState.xcuserstate
git commit -m "Removed file that shouldn't be tracked"
在切换分支之前,必须先对该分支进行更改。
I came across the same problem yesterday, I simply go to the project directory, use these commands, and able to solve the problem. 我昨天遇到了同样的问题,我只是去项目目录,使用这些命令,并能够解决问题。 git add .
git add。 and git commit -m "resolved working copy is modified"
和git commit -m“修改了已解决的工作副本”
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.