All Roads Lead to Rome…

Using GitKraken to shorten your journey by a step

Christopher West
3 min readMar 19, 2021
Photo by Joshua Aragon on Unsplash

In yesterday’s article, we covered using GitKraken as an alternative to the git command-line tool for creating and pushing your project up to a GitHub repository that you had to create in an early step in the process. What if you could cut out that extra step? Let’s take a look at how we can!

A quick recap

First, let’s take a quick look at the steps from previous articles that we will have needed to complete. For this article’s example, we need to have:

  1. Created a Unity Project
  2. Added that project to a local repository using either command line or, preferably, GitKraken.
  3. Add a .gitignore file to the local repository
  4. Staged our project files and created a commit from them.

Connect your GitHub account to GitKraken

At this stage, we need to give GitKraken the ability to communicate directly with out GitHub account so that it can create our repo in a later step. To do this:

  • In GitKraken, Click on the settings cog in the upper right-hand corner.
  • Select Integrations and then GitHub
  • Click the Connect to Github button and enter your credentials for GitHub

Link your GitHub repository to your local repository

You’ll notice in that list that the step of creating the repository on GitHub was left out. By connecting your GitHub Account to GitKraken you gain the ability to push local repositories into your account while creating the new repository for you on GitHub, no need to jump out to the website and create the repo first! Let’s walk through how to use this option.

Add Remote Repository using GitHub Tab

Now let’s look at using the GitHub tab. The other tabs for specific git hosts work similarly.

  1. In GitKraken, Hover over the Remote tab in the panel on the left side of the interface and click the “+” button that appears.
  2. Click on the GitHub tab at the top of the panel that opens
  3. Select your Account from the dropdown
  4. Give your new repository a name, for this example we’ll keep the name matching our project folder.
  5. origin is already the default remote name, I would leave this unless you have a specific need to change it
  6. you can provide an optional description
  7. Select Public or Private Access for the repository we are about to create
  8. Click the “Create remote and push local refs” button

This will create a new GitHub repository, and push all of your current local commits up to it!

Next Time!

I know that there are a lot of ways to get to the same result when creating git repositories for our Unity projects but, hopefully, this method will shorten the journey just a little. Tomorrow we will take a look at large files in our projects, the problems they can present with GitHub, and how to fix them. If you enjoyed this article, or want to come along with me as I progress on my journey, follow me at gamedevchris.medium.com.

--

--

Christopher West
Christopher West

Written by Christopher West

Unity Game Developer, Software Engineer, Gamer, Musician, and Father. Christopher is a creative that enjoys a challenge and loves coding.

No responses yet