Setting Up Git

Objective: Configure Git repository to be used in Unity.

Git is a space for collaboration and the maintenance of a project’s code. In order to use this space, we will need to connect it to said project.

To begin, let’s create a new project within Unity.

Unity Hub

Open up Unity Hub and select New.

A popup window will appear asking you to detail the specifics of this project.

Creating new project

Edit the name and file location and select Create.

After your project has been created. Head over to GitHub. The page will look as shown.


You’ll need to create a new repository before linking Git to the project. That said, on the homepage click New.

Creating new repository

Once inside, edit the Repository Name and Description as you see fit.

After you’ve selected and name, you have the option of making repository Public or Private, add a README or .gitignore file, or choose any license that may apply.

For this example, we will be adding a .gitignore file.

Select Unity as there are files within the program that aren’t necessary to commit when working with a team.

Select Create Repository once you’ve completed this step.

New repository

You are now ready to link Git to your project!

You’ll need to initialize Git inside your project to get started. To do so, navigate to your project within Git Bash.

Note: You can also navigate to file location, right-click, and select “Git Bash Here”

Once inside, type command: git init and press enter on your keyboard.

After initialization is completed, head back to GitHub copy the link to your repository from the Code menu.

Once copied, head back over to Git Bash and type : git remote add origin. Paste the link to the end of the command line and press enter on the keyboard.

To verify that your project has been linked to the remote server, type: git remote -v.

Successfully linked

With that, your project is now linked to Git!




Software Engineer chronicling my journey to the gaming industry.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Maintaining functional annotation databases in a genomic era

Bi-Weekly Progress Report August 11th to August 25th 2021

Book Notes: Changing Software Development — Allan Kelly

Dragon War x MetaGaming Guild: Deep dive into The Gaming Ecosystem with extraordinary AMA

MicroStrategy Education Newsletter | July 2021

GHF Update 8/28/21 — New Beginner Bundles Launched

What is Data Lineage and How Can It Ensure Data Quality?

A Provisional Timeline for the Threshold Merger

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Edwin Hinson

Edwin Hinson

Software Engineer chronicling my journey to the gaming industry.

More from Medium

Commit with Git!

An introduction to c# and the .Net library.

Visual Studio: Regular expression to apply NameOf operator in C#— Coragi

Improving Upon Selection Highlighting in Our Game — Part 3