Skip to content

Instantly share code, notes, and snippets.

@fonylew
Created November 2, 2021 05:41
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 fonylew/3f3df674b18aee2feb35486abae8d97c to your computer and use it in GitHub Desktop.
Save fonylew/3f3df674b18aee2feb35486abae8d97c to your computer and use it in GitHub Desktop.
git config --global alias.lg "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit"
git config --global alias.sweep '!git branch --merged $([[ $1 != "-f" ]] \
&& git rev-parse master) | egrep -v "(^\*|^\s*(master|develop)$)" \
| xargs git branch -d'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment