Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
oh-my-zsh
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
github
oh-my-zsh
Commits
8c808da2
Unverified
Commit
8c808da2
authored
Feb 20, 2023
by
Francesco Ilario
Committed by
GitHub
Feb 20, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(git): add aliases for gone branches (#9250)
Closes #8457 Closes #9973
parent
cc73a929
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
0 deletions
+6
-0
README.md
plugins/git/README.md
+3
-0
git.plugin.zsh
plugins/git/git.plugin.zsh
+3
-0
No files found.
plugins/git/README.md
View file @
8c808da2
...
...
@@ -25,6 +25,9 @@ plugins=(... git)
| gbd | git branch --delete |
| gbda | git branch --no-color --merged
\|
grep -vE "^(
[
+*
]
\|\s
*(<span>$</span>(git_main_branch)\|<span>$</span>(git_develop_branch))\s*
<span>
$
</span>
)"
\|
xargs git branch --delete 2>/dev/null |
| gbD | git branch --delete --force |
| gbg | git branch -vv | grep ": gone
\]
" |
| gbgd | local res=$(git branch -vv | grep ": gone
\]
" | awk '{print $1}') &&
[
[ $res
]
] && echo $res | xargs git branch -d |
| gbgD | local res=$(git branch -vv | grep ": gone
\]
" | awk '{print $1}') &&
[
[ $res
]
] && echo $res | xargs git branch -D |
| gbl | git blame -b -w |
| gbnm | git branch --no-merged |
| gbr | git branch --remote |
...
...
plugins/git/git.plugin.zsh
View file @
8c808da2
...
...
@@ -73,6 +73,9 @@ alias gba='git branch --all'
alias
gbd
=
'git branch --delete'
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
gbD
=
'git branch --delete --force'
alias
gbg
=
'git branch -vv | grep ": gone\]"'
alias
gbgd
=
'local res=$(gbg | awk '
"'"
'{print $1}'
"'"
') && [[ $res ]] && echo $res | xargs git branch -d'
alias
gbgD
=
'local res=$(gbg | awk '
"'"
'{print $1}'
"'"
') && [[ $res ]] && echo $res | xargs git branch -D'
alias
gbl
=
'git blame -b -w'
alias
gbnm
=
'git branch --no-merged'
alias
gbr
=
'git branch --remote'
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment