Can't push/pull to/from brand new repository hooked up to Xcode

后端 未结 2 1813
北荒
北荒 2021-02-07 08:29

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 successf

2条回答
  •  独厮守ぢ
    2021-02-07 08:54

    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:

    1. Create a new repo on github, say nyuman/Beaner2. Don't change anything else on github. Don't add a README.
    2. Copy the ssh URL (assuming you just created the new repo): git@github.com:nyuman/Beaner2.git
    3. Open a Terminal window and navigate to your project directory. In that window run:

      git remote add origin git@github.com: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.

提交回复
热议问题