Git Essentials Cheatsheet

Here's a reference list of commonly used Git commands:

  • git clone git@github.com:USER-NAME/REPOSITORY-NAME.git
  • git push or git push origin main
  • git add .
  • git commit -m "A message describing the changes"
  • git status
  • git log

The basic Git syntax is program | action | destination.

For example:

  • git add . is read as git | add | ., where the period represents everything in the current directory.
  • git commit -m "message" is read as git | commit -m | "message".
  • git status is read as git | status | (no destination).