You are here: Kinds of code · Git

Save history

Git watches a folder and remembers snapshots.

It is like Save As with a timeline. You can see what changed and undo a mess. GitHub is a website that stores those snapshots online. Git itself works on your phone with no account. You do not need GitHub yet.

1

git init

Start keeping history in this folder.

2

git add .

These files should be in the next snapshot.

3

git commit -m "First programs"

Take the snapshot now, with a short note to future-you.

Five words later

status — what changed since last snapshot.

add — mark files to include.

commit — save a snapshot.

log — list old snapshots.

diff — show the exact text that changed.

Stage 4 is the lab

This page is the dictionary. The typed session lives on the Path when that installment opens. For now, know that Git is writing about writing, not a second Python.