Skip to content
All courses

Git and GitHub without the pain

Save points for your code. Commit, go back in time, back it up, and survive your first merge conflict.

FreeChill 5 levels about 38 min badge: Version Controller

Git is a save system for code. That's it. We skip the theory lecture and do the ten commands you'll use every day, in the order you'll need them. Install Git from git-scm.com first (on a Mac, typing `git` in Terminal offers to install it).

By Dispresso

Playing as a guest. Level 1 is yours to try. Sign in to save XP, keep a streak and earn the badge.

Sign in to save

Level 1 of 5

Save points

About 6 minutes

Tell Git who you are, once per computer. This goes in every save point you make:

bash
git config --global user.name "Your Name"
git config --global user.email "you@example.com"
git config --global init.defaultBranch main

Now in your project folder:

bash
git init                 # start tracking this folder
git status               # what changed? (run this constantly)
git add .                # stage everything that changed
git commit -m "first save"   # make the save point
  1. Edit files
  2. git add
  3. git commit
  4. Save point

git add picks what goes in the next save. git commit makes it. Two steps, so you can save some changes and not others.

Commit messages are for future you at 1am. "fix" tells you nothing. "Welcome message uses the member's nickname" tells you everything.

Fill the gap

Fill in the command that makes the save point.

git add .
git  -m "first save"