From bca62f78e23247afdc44882111a27a7333e5acb0 Mon Sep 17 00:00:00 2001 From: Adam Johnson Date: Tue, 26 Sep 2023 08:22:32 +0100 Subject: [PATCH] feat(git): add branch rename alias `gbm` (#11909) Co-authored-by: Gabriel Akinyosoye --- plugins/git/README.md | 1 + plugins/git/git.plugin.zsh | 1 + 2 files changed, 2 insertions(+) diff --git a/plugins/git/README.md b/plugins/git/README.md index 390f52001..e7c32e97f 100644 --- a/plugins/git/README.md +++ b/plugins/git/README.md @@ -44,6 +44,7 @@ plugins=(... git) | `gbda` | `git branch --no-color --merged \| command grep -vE "^([+*]\|\s*($(git_main_branch)\|$(git_develop_branch))\s*$)" \| command xargs git branch --delete 2>/dev/null` | | `gbgd` | `LANG=C git branch --no-color -vv \| grep ": gone\]" \| awk '"'"'{print $1}'"'"' \| xargs git branch -d` | | `gbgD` | `LANG=C git branch --no-color -vv \| grep ": gone\]" \| awk '"'"'{print $1}'"'"' \| xargs git branch -D` | +| `gbm` | `git branch --move` | | `gbnm` | `git branch --no-merged` | | `gbr` | `git branch --remote` | | `ggsup` | `git branch --set-upstream-to=origin/$(git_current_branch)` | diff --git a/plugins/git/git.plugin.zsh b/plugins/git/git.plugin.zsh index 426f51979..01eab682e 100644 --- a/plugins/git/git.plugin.zsh +++ b/plugins/git/git.plugin.zsh @@ -125,6 +125,7 @@ alias gbD='git branch --delete --force' alias gbda='git branch --no-color --merged | command grep -vE "^([+*]|\s*($(git_main_branch)|$(git_develop_branch))\s*$)" | command xargs git branch --delete 2>/dev/null' alias gbgd='LANG=C git branch --no-color -vv | grep ": gone\]" | awk '"'"'{print $1}'"'"' | xargs git branch -d' alias gbgD='LANG=C git branch --no-color -vv | grep ": gone\]" | awk '"'"'{print $1}'"'"' | xargs git branch -D' +alias gbm='git branch --move' alias gbnm='git branch --no-merged' alias gbr='git branch --remote' alias ggsup='git branch --set-upstream-to=origin/$(git_current_branch)'