Sign in

Git in Pictures: A Visual Companion to the Git Course

Pictures that show where your files go when you add, commit, branch, merge, and share with a remote. Read it next to the Git course.

Git in pictures

This page has the pictures from the Git course, placed where they help most. Read each section next to the matching course step.

1. What Git is: the three places

Git is a save system for a folder. Your files can be in one of three places: your folder, the waiting room (the staging area), and the save history (the repository).

The Git logo: an orange diamond with a branch graphic, the logo of the Git version control system

Logo: Git logo by Jason Long, Wikimedia Commons, CC BY 3.0.

Read the diagram from left to right. Your folder is where you edit. The waiting room holds the changes you picked. The save history holds every save point.

Diagram of Git's basic data flow: the working directory, the staging area, and the repository, with the commands that move files between them

Diagram: Git data flow by Lbhtw, Wikimedia Commons, CC BY-SA 3.0.

2. What happens when you commit

When you run git add index.html, a copy of the file goes into the waiting room. The file in your folder stays the same.

When you run git commit -m "Add home page", Git takes everything in the waiting room, saves it as one commit with your note, and empties the waiting room.

Diagram: index.html in your folder is copied into the waiting room by git add, then git commit saves it as a new commit in the save history.

3. Branches and merges

A branch is a separate line of saves. A merge joins two lines. When both lines have new saves, the join is a merge commit with two parents.

Commit graph of a merge: a top line of commits D, C, B, A and a bottom line W, X, Y, Z, joined by a merge commit Z' that has both D and Z as parents

Diagram: Git branches merge by Bunyk, Wikimedia Commons, CC BY-SA 4.0.

4. Working with a remote

A remote is a shared copy of your project. Your clone is a full copy on your computer. The arrows show the commands: push sends commits to the remote, fetch and pull bring commits back, and add and commit save your work locally.

Diagram of common Git operations across four areas: remote, clone, branches, and working files, showing pull, fetch, push, checkout, reset, merge, add, and commit

Diagram: Git operations by Daniel Kinzler, Wikimedia Commons, CC BY 3.0.

Go back to the course

Each picture here matches a step in the course. Open the course and follow the steps in order:

Git from Zero to Pro: Hands-On Course with a Team Website Project

More articles

Grok Bot x Cursor Hackathon Kochi: Date, Venue, Agenda and How to Register

Mixture of Experts (MoE) Explained: How Sparse Models Scale

All articles →