Xcode报错"The working copy 'xxx' has uncommitted changes"解决方案

简介: Xcode报错"The working copy 'xxx' has uncommitted changes"解决方案

有时候想切换到其他的branch或者试图执行merge、pull、push等操作,即使未做任何修改,也会报出这个错误,因为真正的内容没有任何修改,因此推测可能是某些状态文件或者描述文件在捣鬼。  

只需要进入项目文件夹目录下,分别执行以下两行代码即可。

<code class="hljs brainfuck has-numbering" style="display: block; padding: 0px; color: inherit; box-sizing: border-box; font-family: 'Source Code Pro', monospace;font-size:undefined; white-space: pre; border-radius: 0px; word-wrap: normal; background: transparent;"><span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">git</span> <span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">rm</span> <span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">cached</span> <span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">*</span><span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">.</span><span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">xcuserstate</span> <span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">git</span> <span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">rm</span> <span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">cached</span> <span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">*</span><span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">.</span><span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">xcuserdata</span></code><ul class="pre-numbering" style="box-sizing: border-box; position: absolute; width: 50px; top: 0px; left: 0px; margin: 0px; padding: 6px 0px 40px; border-right-width: 1px; border-right-style: solid; border-right-color: rgb(221, 221, 221); list-style: none; text-align: right; background-color: rgb(238, 238, 238);"><li style="box-sizing: border-box; padding: 0px 5px;">1</li><li style="box-sizing: border-box; padding: 0px 5px;">2</li></ul>


相关文章
|
3月前
|
iOS开发 MacOS Perl
解决Xcode运行IOS报错:redefinition of module ‘Firebase‘和could not build module ‘CoreFoundation‘
解决Xcode运行IOS报错:redefinition of module ‘Firebase‘和could not build module ‘CoreFoundation‘
126 4
|
3月前
|
iOS开发 Perl
解决Xcode15报错:DT_TOOLCHAIN_DIR cannot be used to evaluate LIBRARY_SEARCH_PATHS
解决Xcode15报错:DT_TOOLCHAIN_DIR cannot be used to evaluate LIBRARY_SEARCH_PATHS
124 1
|
3月前
|
iOS开发 Perl
解决Xcode报错Stored properties cannot be marked unavailable with ‘@available‘
解决Xcode报错Stored properties cannot be marked unavailable with ‘@available‘
44 0
|
6月前
|
iOS开发
拷贝的xcode升级问题及解决方案
拷贝的xcode升级问题及解决方案
44 2
|
6月前
|
iOS开发
Xcode报错“compact unwind compressed function offset doesn‘t fit in 24 bits
Xcode报错“compact unwind compressed function offset doesn‘t fit in 24 bits
59 1
|
6月前
|
iOS开发
XCode控制台调试无法看到函数跟踪或无法看到输出的日志问题及解决方案
XCode控制台调试无法看到函数跟踪或无法看到输出的日志问题及解决方案
249 0
|
6月前
|
iOS开发
Xcode 10.2.1 Error:Multiple commands produce问题及解决方案
Xcode 10.2.1 Error:Multiple commands produce问题及解决方案
494 0
|
6月前
|
iOS开发
Xcode 10 Error:Multiple commands produce问题及解决方案
Xcode 10 Error:Multiple commands produce问题及解决方案
85 0
|
12月前
|
Shell iOS开发
[√]xcode如何自定义将不同位置的本地文件copy到app的指定目录
[√]xcode如何自定义将不同位置的本地文件copy到app的指定目录
329 0
|
iOS开发
Xcode运行报错The certificate used to sign “XXX” has either expired or has been revoked.解决办法
Xcode运行报错The certificate used to sign “XXX” has either expired or has been revoked.解决办法
245 0