Git & Github
Chaos…This digital world would be chaos without Git.
In software development, there can be multiple developers working in parallel on the same project with each developer starting from the same base code. Overtime this code will evolve as each developer focuses on different updates, revisions or features of the code as it is progressing through the build. These many iteration can make the workflow very chaotic if there isn’t a way to see and organize all of the changes made to code. Enter, Git. Git is an open-sourced version control and distributive system that make sense of the chaos. It allows developers to store the code on a remote repository, so all developers can see what changes are being made to the code.
Github is an extension of Git and acts as a manager for your repository using a friendly UI and is what I am using to help version control my Space Shooter 2D game. Using my Github account, I created a new project. When create a new repository there are a few key things you will need to know.
When initializing the repository make sure you add a .gitignore and select the Unity template. This will prevent the uploading of temporarily Unity files to your repository. Once I create this repository, I needed to make a clone of it so there was a local version of my computer and through the magic of the Githhub Desktop App, you can connect the locate with the remote version on Github very easily. Now, I was ready to create my Space Shooter 2D Unity project. Once the blank project was create I had to make some adjustment to the project settings of Unity to ensure everything would be successfully committed to Github.
In Editor, it is important for Version control to make Meta Files visible and put Asset Serialization into Force Text mode. At this moment, I was almost ready to make my initial commit of the blank project when I notice I would be commit thousands fo file, which did’t seem right. I discovered the files that .gitignore was suppose to ignore were not being ignore. I found a solution and made the follow changes to .gitignore.
Now, I was ready to make the initial commit and it will certainly not be my last!