git : add gbda to delete all local branches except for the current one.

This commit is contained in:
Dmitry Voronin 2023-11-15 16:57:39 +03:00
parent 279ced473c
commit 2059668718
2 changed files with 2 additions and 0 deletions

View file

@ -513,6 +513,7 @@ Command|Description
`gchb`|Git checkout branch. `gchb`|Git checkout branch.
`gb`|Git branch. `gb`|Git branch.
`gbd [BRANCH]`|Delete specified Git branch. `gbd [BRANCH]`|Delete specified Git branch.
`gbda`|Delete all local branches except the current one.
`gf`|Git fetch --all. `gf`|Git fetch --all.
`gt`|Git tag. `gt`|Git tag.
`gi`|Delete files updated in git ignore. `gi`|Delete files updated in git ignore.

View file

@ -11,6 +11,7 @@ alias gch="git checkout"
alias gchb="git checkout -b" alias gchb="git checkout -b"
alias gb="git branch --all" alias gb="git branch --all"
alias gbd="git branch -D" alias gbd="git branch -D"
alias gbda="git branch | grep -v ^* | xargs git branch -D"
alias gf="git fetch --all -v -p" alias gf="git fetch --all -v -p"
alias gt="git tag" alias gt="git tag"
alias gi="git ls-files -ci --exclude-standard -z | xargs -0 git rm --cached" alias gi="git ls-files -ci --exclude-standard -z | xargs -0 git rm --cached"