Sikau

Git & GitHub · Day 1 · about 20 min

What is version control?

Save points for your whole project.

final_v2_REALLY_final.html

Ever saved menu.html, then menu-old.html, then menu-final.html, then menu-final-2.html? Every developer has. Git fixes this for good: it remembers every version of every file, who changed what and why — and lets you go back to any of them.

Like save points in a game: In a game you save before the boss fight. If it goes badly, you load the save. Git gives your project save points called commits — and you can make as many as you like.

Your first repository

A repository (repo) is a project folder that Git is watching. git init turns any folder into one. Sikau gives you a practice terminal: press Run to send the commands.

git status
git init
git status
  • Git runs on your computer; GitHub is a website that stores copies of repositories so teams can share them.
  • git status is the command you'll type most. When in doubt, run it.
  • Lines starting with # are comments — the terminal ignores them.

On your own computer, install Git from git-scm.com and type these same commands in a terminal.

The rest of this lesson

  • Why every developer uses itexplain
  • What Git actually storesexplain
  • What happens?predict
  • Git wordsmatch
  • Your turnwrite code
  • Badge quizquiz
  • What you learnedrecap

Continue this lesson free — run real code in your browser

Continue with Google

See all 18 lessons of Git & GitHub