Add Xcode project to github repository?

I just created a new github repository on a website. Keep in mind that I am noob, but I can do basic things in the terminal. Anyway, that’s why I just created a repo in my github.com account and haven’t done anything for it yet.

So all I want to do is take my folder Xcode project and upload it to my new github registry. How to do it through the terminal?

+50
git github terminal xcode project
02 Oct
source share
6 answers

The best way is to follow GitHub instructions:

First go to the correct directory

cd <directory of your Xcode project> 

It sounds like you already have a local Git project from Xcode. If true, skip this code block.

 git init . git add . git commit -s <type in a commit message> 

Finally, click on your repository. The following is copied directly from my own github account after I created a new “test” repo. Change the dhalperi / test part.

Click an existing repository from the command line

 git remote add origin git@github.com:dhalperi/test.git git push -u origin master 
+64
Oct 02
source share

I was just about to leave a comment above, but I will also add a generic answer. My complete answer is here .

This is not via the terminal as requests, but you can consider this an alternative method. It integrates well with Xcode now, but not complicated.

Create a Git repository when creating a new project

enter image description here

See the answer related to above if you already have a project without a Git repository.

Make commit

enter image description here

After making changes to the project, select Commit ... from the Source Control menu. You will add a short commit message.

Create a New GitHub Repository

enter image description here

On GitHub, create a new repository. Name everything you want, but don't add a README or .gitignore or license. After creating a new repository, copy the link to it.

Add Remote Access to Xcode

in Xcode, go to Source Control > your branch name> Customize . Then click the Remote tab> + "> Add remote . Fill in the name and address of your repository.

enter image description here

Submit your project to GitHub

Go to Source Control > Press . The first time you will need to enter your GitHub username and password.

What is it. Now that you are making changes to Xcode, all you have to do is Commit and Push .

If you have not followed this explanation, read this and this for more details.

Further research

This is a great video that I recently watched that helped me better understand Git and its integration with GitHub.

+53
Sep 10 '15 at 10:00
source share

Get the Github Mac app, you really don't need a terminal unless you want to do more interesting things, -)

Just go to the project page on GitHub, then click "Clone in Mac", this should automatically download and install it for you. You must do this at least once in order to install the application and set some required permissions.

After that, you will see the GitHub application in your dock, just open it, then click on this small “+” sign at the bottom, there you will see “Create a new repository” and “Add a new local repository”.

You can either add the repository that Xcode has already created for you, or download it from GitHub and then open it in Xcode.

+7
Oct 03
source share

Learn git !;)

Here's how it (takes just a few minutes): http://try.github.com/levels/1/challenges/1

+6
Oct 02
source share

a non-terminal solution is to install SourceTree . Its graphical interface, which is very easy to use compared to the terminal. But its highly recommended that you learn the git commands correctly.

+2
Aug 22 '14 at 5:01
source share

if you already have a git repository on your Mac and using Xcode 9,

for xcode 9, just go to the source control tab in the navigation inspector in Xcode. right-click on the main git and select the "Remote project name" button on the GitHub menu.

provide your GitHub credentials and give the name git repo and Xcode will create and push your code for you. enter image description here

0
Nov 18 '17 at 10:36
source share



All Articles