1
0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2026-02-13 05:59:46 +08:00

Compare commits

..

4 Commits

Author SHA1 Message Date
Adam Johnson
4fb5d02db9
feat(git): add reset aliases grhk and grhs (#11896) 2023-09-26 09:31:32 +02:00
Adam Johnson
e2b855341b
feat(git): add tag aliases gt and gta (#11910)
Co-authored-by: hasecilu <hasecilu@protonmail.com>
Co-authored-by: Rik <gitaarik@posteo.net>
Co-authored-by: Carlo Sala <carlosalag@protonmail.com>
2023-09-26 09:27:48 +02:00
Adam Johnson
bca62f78e2
feat(git): add branch rename alias gbm (#11909)
Co-authored-by: Gabriel Akinyosoye <gabrielfemi799@gmail.com>
2023-09-26 09:22:32 +02:00
Adam Johnson
aaa74964a8
fix(git): remove --text from gsts (#11897) 2023-09-26 09:18:54 +02:00
2 changed files with 12 additions and 2 deletions

View File

@ -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` | | `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` |
| `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` | | `gbnm` | `git branch --no-merged` |
| `gbr` | `git branch --remote` | | `gbr` | `git branch --remote` |
| `ggsup` | `git branch --set-upstream-to=origin/$(git_current_branch)` | | `ggsup` | `git branch --set-upstream-to=origin/$(git_current_branch)` |
@ -162,6 +163,8 @@ plugins=(... git)
| `grh` | `git reset` | | `grh` | `git reset` |
| `gru` | `git reset --` | | `gru` | `git reset --` |
| `grhh` | `git reset --hard` | | `grhh` | `git reset --hard` |
| `grhk` | `git reset --keep` |
| `grhs` | `git reset --soft` |
| `gpristine` | `git reset --hard && git clean -dffx` | | `gpristine` | `git reset --hard && git clean -dffx` |
| `groh` | `git reset origin/$(git_current_branch) --hard` | | `groh` | `git reset origin/$(git_current_branch) --hard` |
| `grs` | `git restore` | | `grs` | `git restore` |
@ -183,7 +186,7 @@ plugins=(... git)
| `gstp` | `git stash pop` | | `gstp` | `git stash pop` |
| `gsta` | On Git >= 2.13: `git stash push` | | `gsta` | On Git >= 2.13: `git stash push` |
| `gsta` | On Git < 2.13: `git stash save` | | `gsta` | On Git < 2.13: `git stash save` |
| `gsts` | `git stash show --text` | | `gsts` | `git stash show` |
| `gst` | `git status` | | `gst` | `git status` |
| `gss` | `git status --short` | | `gss` | `git status --short` |
| `gsb` | `git status --short -b` | | `gsb` | `git status --short -b` |
@ -196,6 +199,8 @@ plugins=(... git)
| `gswc` | `git switch -c` | | `gswc` | `git switch -c` |
| `gswd` | `git switch $(git_develop_branch)` | | `gswd` | `git switch $(git_develop_branch)` |
| `gswm` | `git switch $(git_main_branch)` | | `gswm` | `git switch $(git_main_branch)` |
| `gt` | `git tag` |
| `gta` | `git tag --annotate` |
| `gts` | `git tag -s` | | `gts` | `git tag -s` |
| `gtv` | `git tag \| sort -V` | | `gtv` | `git tag \| sort -V` |
| `gignore` | `git update-index --assume-unchanged` | | `gignore` | `git update-index --assume-unchanged` |

View File

@ -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 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 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 gbnm='git branch --no-merged'
alias gbr='git branch --remote' alias gbr='git branch --remote'
alias ggsup='git branch --set-upstream-to=origin/$(git_current_branch)' alias ggsup='git branch --set-upstream-to=origin/$(git_current_branch)'
@ -309,6 +310,8 @@ alias grup='git remote update'
alias grh='git reset' alias grh='git reset'
alias gru='git reset --' alias gru='git reset --'
alias grhh='git reset --hard' alias grhh='git reset --hard'
alias grhk='git reset --keep'
alias grhs='git reset --soft'
alias gpristine='git reset --hard && git clean --force -dfx' alias gpristine='git reset --hard && git clean --force -dfx'
alias groh='git reset origin/$(git_current_branch) --hard' alias groh='git reset origin/$(git_current_branch) --hard'
alias grs='git restore' alias grs='git restore'
@ -331,7 +334,7 @@ alias gstp='git stash pop'
is-at-least 2.13 "$git_version" \ is-at-least 2.13 "$git_version" \
&& alias gsta='git stash push' \ && alias gsta='git stash push' \
|| alias gsta='git stash save' || alias gsta='git stash save'
alias gsts='git stash show --text' alias gsts='git stash show'
alias gst='git status' alias gst='git status'
alias gss='git status --short' alias gss='git status --short'
alias gsb='git status --short --branch' alias gsb='git status --short --branch'
@ -344,6 +347,8 @@ alias gsw='git switch'
alias gswc='git switch --create' alias gswc='git switch --create'
alias gswd='git switch $(git_develop_branch)' alias gswd='git switch $(git_develop_branch)'
alias gswm='git switch $(git_main_branch)' alias gswm='git switch $(git_main_branch)'
alias gt='git tag'
alias gta='git tag --annotate'
alias gts='git tag --sign' alias gts='git tag --sign'
alias gtv='git tag | sort -V' alias gtv='git tag | sort -V'
alias gignore='git update-index --assume-unchanged' alias gignore='git update-index --assume-unchanged'