One page

Git cheat sheet

What to keep at hand. If a line is not clear, go back to the matching lesson in the course.

Open the course: Git: getting started

Snapshot

WhatHow
Statusgit status
To the indexgit add .
Commitgit commit -m "…"
Differencegit diff

Branches and the remote

WhatHow
New branchgit switch -c feature
Mergegit merge feature
Sendgit push
Fetchgit pull
Put asidegit stash
Restore a filegit restore