Save points for your code. Commit, go back in time, back it up, and survive your first merge conflict.
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 saveLevel 1 of 5
About 6 minutes
Tell Git who you are, once per computer. This goes in every save point you make:
git config --global user.name "Your Name"
git config --global user.email "you@example.com"
git config --global init.defaultBranch mainNow in your project folder:
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 pointgit 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"