无法从xcode中提交用户界面状态 [英] Can't exclude user interface state from commit in xcode

查看:120
本文介绍了无法从xcode中提交用户界面状态的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法从提交中排除用户界面状态文件。



每次我尝试推送到github时,它都会要求我先提交并插入用户界面(即使我没有移动鼠标或界面,它仍然显示提交!)。

我尝试了不同的方法,描述如下其他类似的话题。例如,我试图将所有可能的用户界面添加到根中的.gitignore中,如下所示:

  *。xcuserstate 
project.xcworkspace
xcuserdata
UserInterfaceState.xcuserstate
project.xcworkspace /
xcuserdata /
UserInterface.xcuserstate

它不起作用。
我试图清理缓存并重置git,没有帮助。



Git status命令说明如下:修改:.xcodeproj / project.xcworkspace /xcuserdata/.xcuserdatad/UserInterfaceState.xcuserstate



和它看起来像这样



请帮忙(这让我疯狂)!

解决方案

如果这些文件已经提交,您需要在查看您的.gitignore文件之前将其从索引中删除。

  git的RM --cached * .xcuserstate 
#或
的git RM -r --cached project.xcworkspace


I can't exclude user interface state file from commit.

Every time I'm trying to push to github it asks me to commit first and insert user interface state file into the changes (even if I didn't move the mouse or interface at all it still is shown to commit!).

I tried different methods, described in other similar topics. For example, I tried to add all possible cases of user interface into the .gitignore in root, like this:

*.xcuserstate
project.xcworkspace
xcuserdata
UserInterfaceState.xcuserstate
project.xcworkspace/
xcuserdata/
UserInterface.xcuserstate

It didn't work. I tried to clean the cache and reset git, didn't help.

Git status command says the following: "modified: .xcodeproj/project.xcworkspace/xcuserdata/.xcuserdatad/UserInterfaceState.xcuserstate"

And it looks like this

Please help (it is driving me crazy)!

解决方案

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

这篇关于无法从xcode中提交用户界面状态的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆