DEV Community

Can Cellek
Can Cellek

Posted on

Git 101 - Kickstart Your Repo

The "Git Fundamentals" idea has 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 this series I will try to explain what is Git and how you can use it for your projects, specially 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 regularly. What if another colleague is working on the same project and modified the same code? What if you have changed something and realized 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 the 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 each change. 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 backward to current.
  • You can create branches and continue working on different features at the same time. Git will change each code to the corresponding branch state.
  • When you are done you can merge your branches into a master branch that holds finalized features together, most likely a release candidate.
  • 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 changelogs and beta testers to check the situation.
  • Working with a team requires 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 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 a widely used git service around the world.
  • Bitbucket: Bitbucket is another widely used git service where you can create private projects with a free account. With a free account, it restricts you to having limited contributors 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 other services you can use without any hassle. When you are done with the decision part and create your account, it comes to setting up the environment you should work on. Just in case if you are not familiar with some terms, the before-mentioned projects are called a repository. Repositories (shortly repo) are where your project codes are 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. To do that, you can either

  • Use 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 GUI software to visualize how git works first if you plan to use the 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 Software: Here are a few software 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 the terminal as well, you first have to download Git from Git SCM to start. Next article, I will write down how to start working on your repository.

Top comments (0)