Ir para o conteúdo
Avatar do Ned, mascote do GNORGNOR

What Is Git? Version Control Explained for People Just Starting to Make Games

You’ve spent a few hours working on your game. The character is finally moving the way it should. You decide to improve one more little thing. Tweak this. Tweak that. Test it. And… everything breaks. You try to undo it. It doesn’t work. You try to remember how it was before. You can’t remember either….

Ned7 min read

git

You’ve spent a few hours working on your game.

The character is finally moving the way it should. You decide to improve one more little thing.

Tweak this.

Tweak that.

Test it.

And…

everything breaks.

You try to undo it.

It doesn’t work.

You try to remember how it was before.

You can’t remember either.

So you look at the project folder and think:

“I should’ve made a copy first.”

This is usually when files like these start appearing:

MyGame_backup

MyGame_backup2

MyGame_NOW_IT’LL_WORK

MyGame_final

MyGame_final_2

MyGame_final_FOR_REAL

I’m not judging.

This is basically a handmade version control system.

The problem is, there’s a tool made specifically to solve this much better.

It’s called Git.

What is Git?

Git is a version control system.

That definition sounds complicated until we understand the problem it solves.

Imagine you’re playing an RPG.

Before entering a dangerous dungeon, you save the game.

You go in.

You make a terrible decision.

Everything goes wrong.

But there’s an earlier save.

So you can go back to that point and try again.

Git does something conceptually similar with your project.

During development, you can record specific states of your project.

These records form a history.

That way, instead of relying on:

project_final_this_time_for_real_3

you get an organized sequence showing how that project evolved.

It’s like creating save points for development.

This isn’t a technically perfect description of everything that happens inside Git—but to get started, it’s a great way to think about it.

What is a commit?

Now we can learn our first strange term.

Commit.

A commit is a record of a specific state of the project in Git’s history.

Going back to our analogy:

commit ≈ save point

Imagine we’ve finished the character’s movement.

We can record it:

Basic movement working

Next, we added jumping:

Jumping system added

Next, we implemented damage:

The player now takes damage from enemies

Our history starts to look like this:

Basic movement working

↓

Jumping system added

↓

Player takes damage

↓

Health system working

Now we don’t just have a folder full of files.

We have a history of the project’s evolution.

And that’s extremely useful when something goes wrong.

So, is Git a backup?

We need to be careful here.

Git and backup aren’t exactly the same thing.

The main purpose of version control is to record and organize changes to a project.

The main purpose of a backup is to keep a safe copy of your data in case something happens to the original.

Using Git with a remote repository can help protect your project a lot, but I don’t want you to leave thinking:

“I installed Git, so I never have to worry about backups again.”

They’re related problems, but they’re different.

We’ll talk about remote repositories in a little while.

What is a repository?

Another term you’ll see all the time is:

repository, or simply repository.

Imagine a special folder in your project that contains not only the current files, but also the information Git uses to track your history.

We can think of the repository as:

the project + its history tracked by Git.

When you turn your project into a Git repository, Git can start tracking the changes you record in it.

And what is a branch?

This is usually where the confusion starts.

So let’s go back to games.

Imagine we’re developing our character and have an idea:

“What if I add a dash?”

The game is working.

We don’t want to mess up the current version while we experiment.

We can create a branch.

Think of a branch as an alternate timeline.

We have:

Main line

Character walks → jumps → takes damage

And we create:

Experimental line

Character walks → jumps → takes damage → CRAZY DASH THAT MIGHT BREAK EVERYTHING

We can experiment on this line without having to treat the main line as our lab.

If the idea is terrible, we discard the experiment.

If it works…

we need to learn our next term.

What is a merge?

Merge means combining development histories.

Continuing our analogy:

we created an alternate timeline to develop the dash.

We tested it.

We made adjustments.

It worked.

Now we want to bring that change into the main timeline.

That’s where merge comes in.

To put it simply:

Branch

“I’ll try this separately.”

Merge

“It worked. I want to incorporate this change.”

Branches and merges have several details we’ll learn when we actually need to use them.

For now, it’s enough to understand the idea.

Are Git and GitHub the same thing?

No.

This is probably one of the most common points of confusion for people learning about Git.

Git is the version control tool.

GitHub is a service that can host Git repositories remotely and provide additional tools for collaboration and development.

Let’s use another analogy.

Imagine Git is your game’s save system.

Your computer has those saves.

But what happens if the SSD dies?

The saves were on the computer.

That’s why we can also work with a remote repository.

A platform like GitHub can store a copy of this repository remotely.

Like this:

Git
→ tracks versions.

GitHub
→ is a platform that, among other things, hosts Git repositories.

You can use Git without GitHub.

And there are other services that can host Git repositories.

This difference may seem small, but it prevents a lot of confusion later.

Why is Git useful for people who make games?

So far, all of this may seem like something for programmers.

But think about what happens while making a game.

Today, the character moves.

Tomorrow, you change how it moves.

Then you create enemies.

Then you change the damage system.

Then you work on the interface.

Then you realize that a change you made three days ago introduced a bug.

A project doesn’t stay still.

It’s constantly changing.

Git gives us a structured way to track some of that evolution.

And there’s another important benefit:

experimenting feels less scary.

If you know you have a previous state recorded, it feels much more comfortable to try an idea.

For GNOR, this is especially interesting.

I want you to experiment.

Break things.

Find out why they broke.

Try again.

Version control creates a kind of safety net for exploration.

Git becomes even more important when you work as a team

Now imagine two people working on the same game.

You’re working on the character.

Someone else is working on another part of the project.

Without a proper system, this question comes up quickly:

which version is the latest?

Then come the ZIP files.

Shared folders.

Projeto_Ned.zip

Projeto_Joao_novo.zip

Projeto_FINAL_mesmo.zip

And eventually, two people change things that need to be merged.

Git was designed to let different work histories be recorded and later integrated.

That doesn’t mean conflicts magically disappear.

They can happen.

But now there’s a system for identifying and resolving these situations.

Does Git work perfectly with every game file?

There’s an important caveat here.

Git works very well for tracking text files.

Code is the most obvious example.

But game projects also contain:

  • textures;
  • 3D models;
  • audio;
  • videos;
  • files generated by the engine;
  • other binary files.

These files may require different care, especially when they’re large.

For example, there’s Git LFS, which was created to work better with large files.

But we don’t need to learn that now.

Here’s another rule I want to follow at GNOR:

don’t learn fifteen things just because we might need them someday.

When our projects start to require it, we’ll study it.

So where does Construct 3 fit into this?

Since our hands-on journey will start with Construct 3, a question naturally comes up:

do I need to learn Git before starting with Construct?

No.

And I definitely don’t want to turn Git into another barrier before you can create your first game.

First, we need to make things.

But as our projects start to matter, version control makes more and more sense.

That’s why I’m introducing the concept now.

Not so you can memorize commands.

Not so you can install five tools right away.

But so that when you hear:

Git

commit

repository

branch

merge

you not think:

“Oh my God, programming has started.”

You already know roughly what each thing means.

What you need to remember for now

If you forget all the terms in this article, just remember this:

Git tracks the evolution of your project.

A commit is like recording a save point in that evolution.

A repository is a project tracked by Git.

A branch lets you develop on a separate line.

A merge lets you combine work from different lines.

And GitHub is not Git — it’s a platform that can host Git repositories and offer tools for working with them.

That’s enough for now.

When it’s time to actually use Git in our projects, we’ll learn by doing.

No need to memorize a huge list of commands before you need them.

Best wishes!

ned despedindo

Newsletter

Keep exploring with GNOR

Sign-ups aren't live yet: sending will be connected soon.

Written by

Ned

Conversa

Comentários

Carregando comentários…

Deixe seu comentário

Sem cadastro: só nome e e-mail. Seu e-mail não aparece no site e é usado apenas para identificar o comentário.

Comentários passam por moderação antes de aparecer.

Fundamentals

What Is Game Design? The Fundamentals for Beginners Making Games

When you think about making a game, your mind usually goes straight to the visible parts: characters, settings, the engine, interface buttons. But there’s one question that comes before all of that, and many people skip it: How will this game work? What’s the goal? What gets in the player’s way? What choices do they…

1 min read

Fundamentals

Why Does My Event Affect All Objects? How Events Work in Construct 3

You put several monsters on the screen and created an event to destroy a monster. When you tested it, they all disappeared at once. Or the opposite happened: you expected something to affect everyone, but only one object reacted. It’s not a bug. It’s the most important rule in the Construct 3 event sheet. Once…

1 min read

Fundamentals

Do You Need to Learn to Code to Make Games?

You had an idea for a game. You started looking into how you could make it, and before long, words like programming, C#, JavaScript, variables, functions, and logic started coming up. Then you started wondering: “Do I need to learn to program to make games?” If you’ve never programmed before, this question can make game…

1 min read