I'm really new at this, so thanks for your patience (and dealing with my frustration).
I've created a new Xcode project, put it under source control, and have successfully made changes/commits locally.
I've created a public repository at Github (https://github.com/nyuman/Beaner, and excuse the title it's an old inside joke. I'm making a bean counter).
And I've also successfully added that repository in Xcode. I used git as the username, my SSH link, etc.
The problem: when I push from Xcode I get a popup telling me "Working copy out of date. Trying pulling from the remote to get the latest changes, then push again."
So I then try and pull, upon which I get this popup: "Beaner/master" is not a valid remote branch to pull from. Please choose a different remote branch."
I've followed this guide 100%: http://www.raywenderlich.com/13771/how-to-use-git-source-control-with-xcode-in-ios-6
I don't have any outstanding changes that need to be committed. Xcode tells me the remote repository is hooked up fine (green lights everywhere). This has happened practically every time and try and setup source control through Xcode and it's driving me crazy...
Were you successful or is the commit on github not from your xcode project?
Assuming you've already gone through the xcode steps of creating a new project and making some commits which you are now ready to push to github:
nyuman/Beaner2
. Don't change anything else on github. Don't add a README. [email protected]:nyuman/Beaner2.git
Open a Terminal window and navigate to your project directory. In that window run:
git remote add origin [email protected]:nyuman/Beaner2.git
git push origin master:master
Unless there are additional local branches you wish to push, your repos should now be in sync.
My workaround was to install GitHub for Mac. Installed, entered my credentials for GitHub, selected the repo, pulled then pushed and all is well...Doesn't explain what is wrong with XCode 5.1...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With