The “Git Fundamentals” idea have been around my mind for a long time. For developers, git may be easy to understand but for many artists it is mostly overwhelming. In these series I will try to explain what is Git and how you can use it for your own projects, especially tailored for non-developers and indie game developers.
What Is Git Anyway
As KISS (Keep It Simple Stupid) dictates, we can shortly tell that Git is one of the widely used version control systems around. But what is version control? How can you take benefit from it? Imagine you are working on a project, adding new features and fixes on a regular basis. What if another colleague is working on the same project and modified the same code? What if you have changed something and realised it is not working as it should anymore? Well, in such situations git will be your best friend!
- Git allows you to work with multiple colleagues simultaneously, even on same code. These are called conflicts, and can be solved easily since git can show differences between modifications done by each colleague and you can choose with file or which line of code to choose.
- Git stores the history of your each changes. With this approach, you can even get back to the code you wrote a year ago! It is like you have a space-time bending Delorian, only working backwards to current.
- You can create branches and continue working on different features at the same time. Git will change each code to corresponding branch state.
- When you are done you can merge your branches into a master branch that holds finalized features together, most likely a canditate for release.
- If you are using git with service providers issue systems, you can close issues with your commits so it will not be a pain to create change logs and beta testers to check situation.
- Working with a team requires a good project management. You can keep track of each colleagues commits and keep track of the progress.
There are lots of benefits I haven’t mentioned yet but these are just the most important ones.
How To Get Started
First of all, you need a service to use. There are different services around and they all come with their own pros and cons. I will not compare each service in depth, considering these article series are specially tailored for indie devs, I will talk about licenses.
- GitHub: Home of open source projects, GitHub is widely used git service around the world. With a free account where it allows you to create unlimited public projects. If you want to work on a private project, you need to subscribe.
- Bitbucket: Bitbucket is another widely used git service where you can create private projects with a free accound. With a free account it restricts you to have limited contributers working on a private project. If your team is larger, you can subscribe.
- GitLab: GitLab is one of the git services as well. You can create unlimited projects both private and public with unlimited users.
Keep in mind that these can change in the meantime, I strongly recommend you to check out their websites and ask google for in-depth comparisons. In Stygian: Reign of the Old Ones we chose Bitbucket since they have their own other services you can use without any hassle. When you are done with decision part and created your account, it comes to setting up the environment you should work on. Just in case if you are not familiar with some terms, before-mentioned projects are called repository. Repositories (shortly repo) are where your project codes stored. You should create one first to continue.
Let’s Go Already!
Now it is time to make another decision before it gets more technical. First of all, you need your computer to understand “Git”. Git will not work like regular uploading or FTP. In order to do that, you can either
- Use a gui software to do the commands for you
- Use terminal with git commands
Both options are viable, but if you are new to this git magic, I strongly recommend you to use a gui software to visualize how git works first if you plan to use terminal later. Depending on a few researches provided by different resources (sorry, couldn’t find a link) majority of git users use both GUI and CLI (terminal) at the same time. Git GUI Softwares: Here are a few softwares for you
- GitHub Desktop: If you plan to use GitHub, it has a flawless integration (free)
- SourceTree: If you plan to use Bitbucket, it has a flawless integration (free)
- GitKraken: One of the best-looking git clients around, might be easier for you to get used to git. (free for non-commercial projects)
- Tower: One of the most advanced git clients around
Git Terminal If you plan to use terminal as well, you first have to download Git from Git SCM to start. As a windows-user, I find windows terminal and bash creepy. I recommend you to download Cmder as a replacement. Colorized, lots of customizations and stability makes using terminal less spooky. Next article, I will write down how to start working on your repository.