Skip to content

Instantly share code, notes, and snippets.

@ryosms
Last active November 27, 2023 02:13
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 ryosms/fc7df05810d852f2cd9c37b34e934c1d to your computer and use it in GitHub Desktop.
Save ryosms/fc7df05810d852f2cd9c37b34e934c1d to your computer and use it in GitHub Desktop.
# how to use
# 1. download this file (e.g. ~/.git_alias)
# 2. include this file from .gitconfig
# [include]
# path = ~/.git_alias
[alias]
# Delete all merged local branch
cleanbranch = !"git switch develop && git pull --prune && git branch --merged | egrep -v '(accept|develop|production|master|main)' | xargs -n1 git branch -d"
cb = cleanbranch
# history
hist = log --pretty=format:'%h %ad | %s%d [%an]' --graph --date=short
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment