ios – xCode 4.5 git merge无法提交或给出错误

前端之家收集整理的这篇文章主要介绍了ios – xCode 4.5 git merge无法提交或给出错误前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
@H_502_0@
我有两个分支,我试图在xCode 4.5中合并.解析两个冲突的文件并按“合并”按钮后,合并屏幕消失,没有出现错误,看起来它是成功的.但与我之前使用xCode 4.4的经验不同,实际上没有提交任何内容.如果我尝试手动提交所有已更改的文件,则会显示“致命:在合并期间无法进行部分提交”的错误.没有迹象表明如何在xCode中继续.

如果我从命令行执行git status,这就是我得到的.两个“not staged for commit”文件是我在xCode中解决的冲突.我知道我可以尝试使用不同的工具进行合并,但我喜欢xCode实用程序,如果它不再可靠,我将会感到沮丧.其他人看到并解决了这个问题?

# On branch ios6
# Changes to be committed:
#
#   modified:   Flurry/libFlurry.a
#   modified:   Network Commuting/Constants.h
#   modified:   Network Commuting/LegMapViewController.m
#   modified:   Network Commuting/Logging.h
#   modified:   Network Commuting/Nimbler Caltrain-Info.plist
#   modified:   Network Commuting/Plan.m
#   modified:   Network Commuting/PlanStore.m
#   modified:   Network Commuting/RouteDetailsViewController.h
#   modified:   Network Commuting/RouteDetailsViewController.m
#   modified:   Network Commuting/RouteOptionsViewController.m
#   modified:   Network Commuting/SettingInfoViewController.m
#   modified:   Network Commuting/TEXTConstant.h
#   renamed:    Network Commuting/TestFlightSDK1/TestFlight.h -> Network Commuting/TestFlightSDK1-1/TestFlight.h
#   new file:   Network Commuting/TestFlightSDK1-1/libTestFlight.a
#   deleted:    Network Commuting/TestFlightSDK1/README.txt
#   deleted:    Network Commuting/TestFlightSDK1/libTestFlight.a
#   deleted:    Network Commuting/TestFlightSDK1/release_notes.txt
#   modified:   Network Commuting/ToFromViewController.h
#   modified:   Network Commuting/ToFromViewController.m
#   modified:   Network Commuting/TransitCalendar.m
#   modified:   Network Commuting/nc_AppDelegate.h
#   modified:   Network Commuting/nc_AppDelegate.m
#   modified:   Network CommutingTests/Network_CommutingTests.h
#   modified:   Network CommutingTests/Network_CommutingTests.m
#   modified:   Nimbler Caltrain.xcodeproj/project.pbxproj
#   modified:   Nimbler Caltrain.xcodeproj/xcuserdata/apprikamac1.xcuserdatad/xcschemes/Nimbler CaltrainTests.xcscheme
#
# Unmerged paths:
#   (use "git add/rm <file>..." as appropriate to mark resolution)
#
#   deleted by us:      Network Commuting/DateTimeViewController.xib
#
# Changes not staged for commit:
#   (use "git add <file>..." to update what will be committed)
#   (use "git checkout -- <file>..." to discard changes in working directory)
#
#   modified:   Network Commuting/ToFromViewController.m
#   modified:   Nimbler Caltrain.xcodeproj/project.pbxproj
#

解决方法

我总是得到这个,因为有3个人编写应用程序.它似乎与各种人的文件添加删除混合有关,但坦率地说不确定.也许一个git guru会在这里响起,但这就是我解决问题的方法.

首先在Xcode中关闭项目并退出Xcode,然后在Terminal中导航到项目的根目录.对于你必须纠正的任何冲突文件运行’git add'(谁为此提出’添加’???).

运行’git status’并确保一切顺利.

现在为魔术咒语:git commit -i -m“希望和祈祷”. – 魔术选项是-i – 使用它,提交总是成功(对我来说).

现在您可以重新启动Xcode并重新打开项目.

猜你在找的iOS相关文章