Skip to content

Commit

Permalink
git: add aliases for git switch and restore (ohmyzsh#8089)
Browse files Browse the repository at this point in the history
  • Loading branch information
jjanvier authored and mcornella committed Aug 20, 2019
1 parent 43ed0b4 commit de3b14c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions plugins/git/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,9 @@ plugins=(... git)
| grmc | git rm --cached |
| grmv | git remote rename |
| grrm | git remote remove |
| grs | git restore |
| grset | git remote set-url |
| grss | git restore --source |
| grt | cd "$(git rev-parse --show-toplevel \|\| echo .)" |
| gru | git reset -- |
| grup | git remote update |
Expand All @@ -154,6 +156,8 @@ plugins=(... git)
| gsts | git stash show --text |
| gstall | git stash --all |
| gsu | git submodule update |
| gsw | git switch |
| gswc | git switch -c |
| gts | git tag -s |
| gtv | git tag \| sort -V |
| gtl | gtl(){ git tag --sort=-v:refname -n -l ${1}* }; noglob gtl |
Expand Down
4 changes: 4 additions & 0 deletions plugins/git/git.plugin.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,9 @@ alias grm='git rm'
alias grmc='git rm --cached'
alias grmv='git remote rename'
alias grrm='git remote remove'
alias grs='git restore'
alias grset='git remote set-url'
alias grss='git restore --source'
alias grt='cd "$(git rev-parse --show-toplevel || echo .)"'
alias gru='git reset --'
alias grup='git remote update'
Expand Down Expand Up @@ -236,6 +238,8 @@ alias gstp='git stash pop'
alias gsts='git stash show --text'
alias gstall='git stash --all'
alias gsu='git submodule update'
alias gsw='git switch'
alias gswc='git switch -c'

alias gts='git tag -s'
alias gtv='git tag | sort -V'
Expand Down

0 comments on commit de3b14c

Please sign in to comment.