Skip to content

Instantly share code, notes, and snippets.

@Avaq
Created September 25, 2017 12:25
Show Gist options
  • Save Avaq/ee4f8bf625e2cb0b15debb5871efc1eb to your computer and use it in GitHub Desktop.
Save Avaq/ee4f8bf625e2cb0b15debb5871efc1eb to your computer and use it in GitHub Desktop.
# Exit with code 1 if the FILE has *modified* lines
git diff --quiet $FILE || [ $(git diff --numstat $FILE | cut -f 2) = '0' ]
# Output a visual graph of commits
git log --all --graph --pretty='format:%C(auto)%h% D%Creset %Cgreen%an, %ar%Creset %C(white)(%s)%Creset'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment