Ios XCode(git)提交文件失败
我刚开始在Xcode中使用GIT,当我尝试提交一个我一直在处理的旧项目时,遇到了以下错误: 如果取消选中Parse.framework/Headers目录,则会出现此错误 我当前的.gitignore如下所示:Ios XCode(git)提交文件失败,ios,xcode,git,Ios,Xcode,Git,我刚开始在Xcode中使用GIT,当我尝试提交一个我一直在处理的旧项目时,遇到了以下错误: 如果取消选中Parse.framework/Headers目录,则会出现此错误 我当前的.gitignore如下所示: # Xcode # build/ *.pbxuser !default.pbxuser *.mode1v3 !default.mode1v3 *.mode2v3 !default.mode2v3 *.perspectivev3 !default.perspectivev3 xcuse
# 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/
我很想找到一个解决办法
谢谢 问题的解决方案是导航到终端中的目录,然后键入:
- git初始化
- git添加
- git提交“评论”
然后我重新启动了xcode,回到xcode并从那里推进项目。我只是遇到了同样的问题并找到了解决方案。 问题是,如果用户设置设置不正确,Xcode不希望提交。 解决方案是将其放入终端:
建议,使用比xcode更好的免费应用程序SourceTree。SourceTree真是太棒了,谢谢!另一个建议,可以让一个吉特蹒跚学步的孩子很容易!另一个建议是:使用命令行。这是一个稍微高一点的学习曲线,但您将理解git。我不是说只使用终端,我一直都在使用SourceTree。我只是更多地使用命令行。而且还要确保项目中没有
.git
文件夹,应该只有一个.git
文件夹,它应该在您启动git init
的根文件夹中。
xcrun git config --global user.email you@yourdomain.com
xcrun git config --global user.name "Your Name Here"