DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
  1. DZone
  2. Testing, Deployment, and Maintenance
  3. Deployment
  4. The Marriage of Github and Xcode 9

The Marriage of Github and Xcode 9

The new Xcode integration allows you to do pretty much anything in Github directly from Xcode, like browsing repos and pushing commits.

Shashikant Jagtap user avatar by
Shashikant Jagtap
·
Jun. 15, 17 · Tutorial
Like (1)
Save
Tweet
Share
6.67K Views

Join the DZone community and get the full member experience.

Join For Free

finally, xcode and github have come together. since apple made a few projects open-source on github, more people got involved and contributed to those projects. the latest talk at wwdc 2017 on ' github and the new source control workflows in xcode 9 ' exposed how tightly xcode and github are integrated. now we can do almost everything on github from xcode, from creating repositories, pull, push, commit, tags, etc. in this post, we will see the new workflow of xcode and github integration, which covers

  • setting up github in xcode,
  • github source control navigator in xcode,
  • committing from xcode,
  • creating a remote github repo from xcode.

let's cover each of these integrations in brief with xcode 9 ; we need to have xcode 9 for this tutorial.

setting up github in xcode 9

this step assumes you have already downloaded the xcode 9 beta version from the downloads section of your apple developer account and you already have github account.

in the xcode preferences accounts tab, click on the + button to get a list of services like apple id, github, xcode server, and enterprise github.

we now need to select github and use our credentials to login into github and follow the instructions on the screen to complete the setup. you can provide clone method ssh to http. the github setup in xcode 9 is super simple.

in the above gif, we can see how easy it is to setup a github account in xcode and browse the github from xcode.

github navigator in xcode

xcode has introduced another navigator called 'source control navigator' near the project navigator. this shows all the information about branches, tags, and remotes about the current github repo. it also shows the commits in the main pain. i have an example below which shows detailed information about the xcfit github repository.

as you can see in the image, it's very detailed. we can browse through it easily.

commit from xcode

xcode now has the ability to pull, commit, and push from xcode. in order to demonstrate that, let's modify a file and right click on the file to get source control options. we can then commit the file with a commit message straight from xcode. the commit can be pushed using remote source using source control -> push options. we might need to provide our credentials or ssh key and branch for the commit.

create new github repo from xcode

if you are working on a new project, then you can create an entire github project and push to remote using xcode 9.

let's create a new project 'xcode-github' from xcode as a single view application. xcode will automatically add it under source control. we can create a remote repository using the option 'create xcfit remote on github.'

you can see that xcode-github is created and commits start appearing in the feed.

there are some useful features that xcode introduced for github but we will cover only those which are most important.

don't forget to watch the wwdc session ' github and the new source control workflows in xcode 9 ' to learn more.

XCode GitHub

Published at DZone with permission of Shashikant Jagtap, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • A Brief Overview of the Spring Cloud Framework
  • How Observability Is Redefining Developer Roles
  • Fraud Detection With Apache Kafka, KSQL, and Apache Flink
  • How To Create and Edit Excel XLSX Documents in Java

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: