No history yet

Version Control Basics

A Safety Net for Your Ideas

Think about how you save files. You probably have a folder full of names like logo_v1.ai, logo_v2_final.ai, and logo_final_for_real_this_time.ai. It’s a messy way to keep track of changes, and it’s hard to remember what’s different between each version. If you want to go back to an old idea, you have to dig through files, hoping you saved the right one.

Version control is a better way. It acts like a save point system in a video game. Instead of creating new files for every major change, you create a “snapshot” of your entire project at a specific moment. This system, called Git, gives you the freedom to experiment wildly. If you mess something up, you can always reload an earlier save. It’s an undo history that never expires, providing a safety net for your creative process.

Git tracks the history of your project, not just a collection of files.

The Repository

To start using Git, you turn a regular project folder into a repository. A repository (or “repo”) is just your project folder, but with a memory. Git places a hidden subfolder inside it, named .git, where it stores all the historical snapshots. Your project files look the same as they always do; the magic happens quietly in the background.

Repository

noun

A project folder that Git is tracking. It contains all of your project files and the complete history of their changes.

Creating a repository is your first step. You navigate to your project folder using a command line tool and tell Git to start watching it. From that point on, Git is aware of every change you make to any file inside.

# In your project's folder, run this one command:
git init

The Commit

A commit is a snapshot of your repository at a specific point in time. It’s the official “save point” in your project’s history. But unlike a simple file save, a commit is more powerful. Each commit includes a message where you describe what you changed. This creates a clear, readable log of your project's evolution. Looking back, you'll see a story: “Added initial logo concept,” “Switched to a blue color palette,” “Revised typography for headers.”

Making a commit is a two-step process:

  1. Stage Changes: First, you choose which changes you want to include in the next snapshot. This is called staging. It lets you group related changes into one clean commit, even if you’ve been working on several different things.
  2. Commit: After staging, you take the snapshot and write your commit message.

This process might feel strange at first, but it gives you precise control. You decide exactly what goes into each save point, creating a tidy and meaningful project history.

# 1. Stage all new and changed files in the current folder
git add .

# 2. Commit the staged files with a descriptive message
git commit -m "Add initial draft of homepage mockup"

Setting Up Your Identity

Before you make your first commit, you need to introduce yourself to Git. Each commit is stamped with an author name and email. This is crucial when you start collaborating with others, as it shows who made which changes.

You only need to do this once on any new machine. Git will remember your information for all future projects.

git config --global user.name "Your Name"
git config --global user.email "youremail@example.com"

Now that you understand the basic philosophy, let's review the key terms.

Quiz Questions 1/5

What is the primary function of a version control system like Git?

Quiz Questions 2/5

In Git, what is a repository (or 'repo')?

You now have a solid foundation. You know what version control is, why it's a game-changer for creative work, and what repositories and commits are. Next, we'll look at how to review your project's history.