Pushing Xcode Project To Github Within Terminal
文章目录
Apple’s Xcode has integrated with Git tool, a distributed revision control and source code management (SCM) system with an emphasis on speed. It allows developers to control the progress of projects very easily. You could also push your projects to some free web-based hosting service like Github with few button pressed.
However, there is another workaround to push your project to Github – using your local terminal.
1.Setting up Git repository in your local project.
You could either create the git repository when you are creating the project in Xcode.
Or create it in terminal.
1 | git init |
2.Commit your project
When you finished current progress of the project, you will have to commit the modification to the repository.
1 | git commit -m "Add project" |
3.Push your project to Github
First you need to create a git repository for you project on Github. Get the HTTPS clone URL on the right-bottom corner of you newly-created repository page. Make sure it is HTTPS.
Then add the remote repository. Go back to your terminal and type:
1 | git remote add origin https://github.com/artekr/SKDemo.git |
Check if you succeed or not:
1 | git remote -v |
If you could see the above address of your remote repository, you are ready to push your project to Github.
1 | git push origin master |
Got to your Github page and voila: