Xcode说“未提交更改”每当我尝试拉或推 [英] Xcode says "Uncommitted Changes" Whenever I try to git pull or push
问题描述
我在我的项目中使用git,每当我尝试从Xcode中取出时,我都会收到未提交的更改,并且它阻止我拉/推。
我尝试提交并找到一个扩展名为* .xcuserstate的文件,每当我打开/滚动到Xcode中的任何项目文件时,都会修改此文件。这让我别无选择,只能做一个包含该文件的提交,它会用无意义的提交来填充git commit日志。
这是否有办法阻止行为?
我试图将* .xcuserstate和xcuserdata放入git ignore,但是每当我尝试拉动Xcode都会崩溃。
Xcode 4.2和4.3发生这种情况通常情况下,您不希望将<$>
c $ c> *。xcuserstate 和 *。xcuserdata
文件到您的Git存储库中。这些文件并不是您项目的一部分,但只是Xcode存储其本地信息的地方,在重新加载项目时很有用。
您可以通过修复使用:
git rm --cached * .xcuserstate * .xcuserdata
,然后提交结果。这将从存储库中删除这些文件,而无需将它们从您的工作目录中删除。
I am using git in my projects, whenever I try to pull from Xcode I get "Uncommitted Changes" and it prevents me from pulling/pushing. I try to commit and find one file with extension *.xcuserstate, this file is modified whenever I open/scroll into any project file in Xcode. That leaves me no option but to do a single commit that contains that file, which fill the git commit logs with meaningless commits.
Is this there is a way to stop this behavior?
I tried to put *.xcuserstate and xcuserdata into git ignore but that caused Xcode to crash every time I try to pull.
This happens with Xcode 4.2 and 4.3
Normally you don't want to put the *.xcuserstate
and *.xcuserdata
files into your Git repository. These files aren't really part of your project, but are just a place where Xcode stores its local information that is helpful when reloading your project.
You can fix this by using:
git rm --cached *.xcuserstate *.xcuserdata
and then committing the result. This will remove those files from the repository without removing them from your working directory.
这篇关于Xcode说“未提交更改”每当我尝试拉或推的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!