So I want to show my iOS projects to the world! (Not really, I don't actually have any real-world experience) So, where should I start? I would first imagine that GitHub would be the first place to check out. The problem I believe that I would face though is that iOS projects in Xcode I have heard have some complexities to them that I want to get to learn and figure out how to solve and figure out what works and what doesn't.
So I found an article that gave step by step instructions on how to integrate my GitHub account into Xcode, great!
First, you have to create a New Github Access token. To do this, navigate to the GitHub settings -> Click on “Developer settings” located at the bottom -> select “Generate new token” under the “Classic” options.
You can quickly access it from this address: https://github.com/settings/tokens/new
Choose the expiration date (I prefer "no expiration") for your token.
At minimum have the “repo” and “repo:status” permissions selected, but I selected all of them since I want complete control on my projects.
GitHub will generate a new access token for you. Be sure to copy and securely store this token! You will not be able to view this again!
Now, just have to set up Xcode...
Xcode -> settings -> Accounts
Click the + in the bottom left-hand section and select Github
Enter your Github username and the Access token that was generated earlier.
Once that is done, return to the settings
select Source Control -> git
and enter your username and e-mail address
Also click the + in the ignore files and enter *.DS_Store
This is add that to the .gitignore file which is just a Mac thing that we don't need and takes up unnecessary room.
The last step!
Is to add the remote which can be done in the project,
next to the file structure there's a box with an x, this is the source control option in the project that you have to secondary click to add remote. Fill that out and we are DONE!
Now you should have all the power of git at your fingertips and be able to see the logs and everything.
I am new to using git inside of Xcode, I hope this reference might help someone else out get their project setup in Xcode with git.
Top comments (0)