How to connect Xcode and GitHub

Akshay Devkate
Nerd For Tech
Published in
3 min readApr 25, 2021

GitHub is version control software as a service that offers distributed version control, source code management, access control, and many more. GitHub is basically version control with GUI (Graphical User Interface). The developers use it to collaborate with other developers while developing apps.

You might want to push the code as soon as it is modified to the repository's main branch. Connecting GitHub with Xcode makes it easier to make pull requests push the code to GitHub. Upload and download packages and source code easier and conveniently.

To connect GitHub with Xcode first you need to create a GitHub token which will be used in Xcode to verify your ID.

Step 1: Generate Access Token

Log in to your GitHub account and click on the image icon on the right-hand corner of the navigation bar. There you can find a bunch of options click on Settings as shown below.

Then you will be redirected to a new Window of Account settings. Click on Developer Settings

After you click on Developer Settings navigate to Personal access tokens and look for Generate new Token

Once you create a new token copy it. You can only see token once.

Once you copy that token go to the next step.

Step 2: Authenticating with token

Open Xcode -> Click on Xcode on the upper left-hand side of the screen -> Click on preferences as shown below.

Now you will be taken over to a new screen. Navigate to accounts and click on + sign available at the bottom left side of the application window once you click on + sign a new dialogue box will appear. Search for GitHub and then continue.

Now a new dialogue box will appear asking you the Account and password in the account you need to provide the User Id of the GitHub account and in the password, you need to provide the Access Token that we got from step 1.

Once you put a valid GitHub ID and Access Token your Github account will be added to the Xcode.

--

--