0

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!

2 Answers2

2

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.

  • And also make sure there is not `.git` folder inside your project, there should be only one `.git` folder and it should be in the root folder where you have fired `git init`. – iphonic Jun 26 '14 at 11:06
0

I just had the same problem and found the solution there. The problem is that Xcode doesn't want to commit if your user settings are not correctly set. The solution is putting this in the terminal:

xcrun git config --global user.email you@yourdomain.com
xcrun git config --global user.name "Your Name Here"
CaptainBleuten
  • 95
  • 1
  • 1
  • 7