Skip to content

Instantly share code, notes, and snippets.

@stephenLee
Created September 2, 2012 13:59
Show Gist options
  • Save stephenLee/3599174 to your computer and use it in GitHub Desktop.
Save stephenLee/3599174 to your computer and use it in GitHub Desktop.
git cheatsheet

Workflow

  • Do some programming
  • git add
  • git status to see what files changed
  1. git status -s
  • git diff [file] to see exactly what modified

    1. git diff --cached

      show diff of staged changes

    2. git diff HEAD

      show diff of all staged or unstaged changes

  • git commit -a -m [message] to commit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment