Add alias 'gitclean'

It removes all branches that are already merged into the master branch.

Signed-off-by: Jacob Kiers <jacob@alphacomm.nl>
This commit is contained in:
Jacob Kiers 2015-01-27 12:23:55 +01:00
parent 5c5efbe77d
commit 882d2087cc

View File

@ -15,6 +15,9 @@ alias t="tmux"
alias x+="chmod +x"
alias +x="chmod +x"
# Remove all local branches already merged in master.
alias gitclean='git branch --merged master | grep -v "\smaster$" | grep -v "*" | xargs git branch -d'
# Detect which `ls` flavor is in use
if ls --color > /dev/null 2>&1; then # GNU `ls`
colorflag="--color"