- Use git-lfs for binary files
Show files changed
git diff
Show untracked files
git ls-files -o
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