您的位置:首页 > 其它

xcode git 切换分支出错

2013-09-05 14:20 211 查看
在切换分支时 提示:  

Working copy is modified

经过google 终于得到答案

So, the solution is this:
The file is untracked in this current branch B
But it exists in the branch we are trying to check out, branch A, so we get a warning that the file in our current working tree will be overwritten (even though we aren't tracking it)
So:
delete the file in your existing directory (I just moved it somewhere out of the working tree initially to be safe) of branch B
check out the branch you want - i.e. branch A
Remove it from branch A using something like this:

git rm --cached app.xcodeproj/project.xcworkspace/xcuserdata/u.xcuserdatad/UserInterfaceState.xcuserstate
git commit -m "Removed file that shouldn't be tracked"
Note: Fwiw, Branch A was my master branch. Branch B was my dev branch.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: