Site Tools


git

Table of Contents

git

Git is a tool for managing repositories. Repositories are like folders, except it's easier to track the changes that happen inside them.

Think of a project you've been working on e.g. a game in written in C++.

You've been working on your game for weeks and now you have quite a bit of code. You're starting to be a little afraid of making changes… what if you break the code? Are you confident you will you be able to fix it? What if it takes too much time to fix it? What if you never fix it? Everything you've been working on for weeks will have been lost forever!

So, like any prudent developer, you make backups. You copy the “Game” folder to Desktop and continue working on it without fear. If something goes wrong you just restore the backup! This works fine for a while, but then you notice you suddenly have a lot of “backups” on your Desktop.

Even worse, some of these “backups” don't compile at all. Yet, these backups that don't compile contain some code you developed that you now need. So, now you have to resort to CTRL + C, CTRL + V from those broken backups, and patch your real code with it. But of course, not before you make another backup.

When you're not using git

Okay, this is way too many backups. Surely, there's gotta be a better way? Yes! That is exactly the problem that Git solves.

git.txt · Last modified: by Ivan Janevski