Skip to content

Instantly share code, notes, and snippets.

@adamgiese
Last active August 30, 2022 16:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adamgiese/fa06f9796de89ce37bba19145ed20e5f to your computer and use it in GitHub Desktop.
Save adamgiese/fa06f9796de89ce37bba19145ed20e5f to your computer and use it in GitHub Desktop.
Some of my favorite git aliases
[alias]
# git grep
todos = grep -i todo -- ':/'
fonts = grep -E "(font)(-family)?:" -- "*.css" "*.scss"
hooks = grep -w -E "use[A-Z]+[a-zA-Z]*"
list-hooks = !git grep -Eho "use[A-Z]+[a-zA-Z]*" | sort | uniq | less
search-all = !git rev-list --all | xargs git grep
colors = grep -IEho -e "#(([0-9a-fA-F]{2}){3}|([0-9a-fA-F]){3})" --or -e "(hsl|rgb)a?[(][^)]*[)]" -- ":/*.css" ":/*.js" ":/*.jsx" ":/*.scss"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment