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:
parent
5c5efbe77d
commit
882d2087cc
@ -15,6 +15,9 @@ alias t="tmux"
|
|||||||
alias x+="chmod +x"
|
alias x+="chmod +x"
|
||||||
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
|
# Detect which `ls` flavor is in use
|
||||||
if ls --color > /dev/null 2>&1; then # GNU `ls`
|
if ls --color > /dev/null 2>&1; then # GNU `ls`
|
||||||
colorflag="--color"
|
colorflag="--color"
|
||||||
|
Loading…
Reference in New Issue
Block a user