diff --git a/.README.md b/.README.md index 0dcd113..6027cb5 100644 --- a/.README.md +++ b/.README.md @@ -513,6 +513,7 @@ Command|Description `gchb`|Git checkout branch. `gb`|Git branch. `gbd [BRANCH]`|Delete specified Git branch. +`gbda`|Delete all local branches except the current one. `gf`|Git fetch --all. `gt`|Git tag. `gi`|Delete files updated in git ignore. diff --git a/.linux/bash/module/git.sh b/.linux/bash/module/git.sh index f667d21..b5eba06 100644 --- a/.linux/bash/module/git.sh +++ b/.linux/bash/module/git.sh @@ -11,6 +11,7 @@ alias gch="git checkout" alias gchb="git checkout -b" alias gb="git branch --all" alias gbd="git branch -D" +alias gbda="git branch | grep -v ^* | xargs git branch -D" alias gf="git fetch --all -v -p" alias gt="git tag" alias gi="git ls-files -ci --exclude-standard -z | xargs -0 git rm --cached"