XCode(git)无法提交文件 [英] XCode (git) failed to commit files
问题描述
我刚开始在Xcode中使用GIT,当我试图提交一个我一直在研究的旧项目时,我遇到了以下错误:
< a href =https://www.dropbox.com/s/jafzgxhit0h4d1e/Screenshot%202014-06-26%2005.37.04.png =nofollow> 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 /
我会为一个解决方案超级满意。
谢谢!
解决问题的方法是导航到终端中的目录,然后输入:
然后我重新启动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.png
If I uncheck the Parse.framework/Headers directory I get this error instead
https://www.dropbox.com/s/aqrpelqarp0liq4/Screenshot%202014-06-26%2005.38.28.png
My current .gitignore looks like this:
# 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/
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 init
- git add .
- git commit "COMMENT"
Then I restarted xcode, went back to xcode and pushed the project from there.
这篇关于XCode(git)无法提交文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!