Skip to content

Instantly share code, notes, and snippets.

@billhance
Last active July 21, 2018 22:03
Show Gist options
  • Save billhance/a89992842a2095a8a19953eef6e87095 to your computer and use it in GitHub Desktop.
Save billhance/a89992842a2095a8a19953eef6e87095 to your computer and use it in GitHub Desktop.
Helpful Git Commands

Helpful Git Commands

Tips

  • Use git-lfs for binary files

Show files changed

git diff

Show untracked files

git ls-files -o

Deployment related commands

Abort on changes to tracked files

git diff --quiet || exit 1

Abort on presence of untracked files in repo

git ls-files -o | grep >/dev/null . && exit 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment