本文介绍了XCode(git)无法提交文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 我刚开始在Xcode中使用GIT,当我试图提交一个我一直在研究的旧项目时,我遇到了以下错误: https://www.dropbox.com/s/ jafzgxhit0h4d1e /截图%202014-06-26%2005.37.04.png 如果我取消选中Parse.framework / Headers目录, / p> https://www.dropbox.com/s/aqrpelqarp0liq4/Screenshot%202014-06-26%2005.38.28.png 我的当前.gitignore如下所示: #Xcode # build / *。 pbxuser !default.pbxuser * .mode1v3 !default.mode1v3 * .mode2v3 !default.mode2v3 * .perspectivev3 !default.perspectivev3 xcuserdata * .xccheckout * .moved-aside DerivedData * .hmap * .ipa * .xcuserstate #CocoaPods ##我们建议不要将Pods目录添加到.gitignore。不过#你应该自己判断,优点和缺点在下面提到:#http://guides.cocoapods.org/using/using-using-cocoapods.html#should-i-ignore-the -pods-directory-in-source-control ##Pods / 我会为一个解决方案超级满意。 谢谢! 解决方案解决问题的方法是导航到终端中的目录,然后输入: git init git add。 git commitCOMMENT 然后我重新启动xcode ,回到xcode并从那里推送项目。 I just got started using GIT with Xcode and when I tried to commit an older project I've been working on I ran in to the following error:https://www.dropbox.com/s/jafzgxhit0h4d1e/Screenshot%202014-06-26%2005.37.04.pngIf I uncheck the Parse.framework/Headers directory I get this error insteadhttps://www.dropbox.com/s/aqrpelqarp0liq4/Screenshot%202014-06-26%2005.38.28.pngMy current .gitignore looks like this:# Xcode#build/*.pbxuser!default.pbxuser*.mode1v3!default.mode1v3*.mode2v3!default.mode2v3*.perspectivev3!default.perspectivev3xcuserdata*.xccheckout*.moved-asideDerivedData*.hmap*.ipa*.xcuserstate# CocoaPods## We recommend against adding the Pods directory to your .gitignore. However# you should judge for yourself, the pros and cons are mentioned at:# http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control## Pods/I'd be supergreatful for a solution.Thanks! 解决方案 The solution to the problem was to navigate to the directory in terminal and then type:git initgit add .git commit "COMMENT"Then I restarted xcode, went back to xcode and pushed the project from there. 这篇关于XCode(git)无法提交文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云! 07-24 04:56