Adding Your Unity Project to a git Repo — Part 1

Let’s start with git and GitHub…

Daniel Jennings
3 min readApr 23, 2021

How are you going to store your app files??

If you want to do software development one of the first things you should figure out is how you are going to store your application project files. If you are testing something out maybe your file system is all you need. However, if you need some backup or are working on a team you will need… Version Control.

Version Control systems like git and svn store your application file system with a history of changes. Made a commit that breaks the entire app?? Find the commit and roll that change back.

How do I get this git??

Find the proper install for you OS on their download page: git download.

The best thing about the git software: if you don’t want a repo(repository) on the web — you don’t need one. It will work locally on your development machine with no web storage account.

Setup a repo on GitHub

After signing up for an account find the green New button.

One New button sits under the top left after clicking on the cat.
Another New button sits under the Repositories tab of your profile.

Pick a unique name for your new repo. This is unique under your account space (not globally unique like some AWS (Amazon Web Service) names).

GitHub checks to make sure that each repository name is unique. In this case it is not.

You can set the repo to Public or Private.

Unity creates a lot of extra files when you are working with it. Since many files are generated during use of Unity you don’t need to include them in the repo. Select the checkbox next to Add .gitignore and search for Unity in the list. This file will tell git what files to ignore from your repo.

After clicking Create Repository you will be taken to the newly created repo home. It should include any files that you selected to create with the repo. In this case only the .gitignore.

Stay tuned for our next segment: Connecting the Unity project to the Web Repo

--

--