Unity and Git
When you were a kid and first starting writing papers or making presentations, what was the first thing you were taught? Save your work, save your work, SAVE. YOUR. WORK. This is extremely relevant for those making games or other products with Unity. Saving your work, however, is still not always enough. You may need to do some risky things or work with others remotely. This is where Git joins the fun.
Git can be very intimidating, but if you want to come on the Unity Developer Journey, it is a very necessary step. Basically, this tool allows you to save your work in a repository on the web, that way you always have a backup and others can contribute as well. Collaboration with others is where things can get tricky.
Working with others is fantastic and absolutely necessary in the developer world. What makes this scary with Git, is when multiple people are working in the same area and possibly causing conflicts that could erase someone else’s work. So how do we avoid this?
First, every member of the team must make sure to pull and keep up to date with the Main or Master branch before they add, commit, and push their own work, in that order.
Second, use branches. Whether you are creating a playable character or simply an enemy you may add, use separate branches. They don’t take up much space and they are extremely useful.
Third, make sure you and your team have a gameplan. Everyone pushes on Thursday, checks out any merge conflicts and pulls to be up to date before work continues the next day. Simple. Maybe have one person be in charge, to keep everyone in line.
Unity and Git are match that is perfect for game development. While it can be frightening and you may lose some work from a simple mistake (sorry to say, that day will come), if you keep working at it when backing up your projects, it will eventually become second nature.