Fork me on GitHub

git-intro quick reference

Other cheatsheets

Glossary

  • Working directory: the actual files you see and edit
  • Staging area: Place files go after git add and before git commit
  • Hash: unique reference of any commit or state
  • Branch: One line of work. Different branches can exist at the same time and split/merge.
  • Remote: Roughly, another server that holds git.

Commands we use

  • git init: create new repository
  • git add:
    • Add a new file
    • Add a file to staging
  • git commit: record a version, add it to current branch