mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-01-23 02:35:38 +01:00
Added new --prune-tags to git fetch alias
This commit is contained in:
parent
a84a0332a8
commit
6e158ec6cb
2 changed files with 11 additions and 4 deletions
|
|
@ -90,7 +90,7 @@ plugins=(... git)
|
|||
| `gdnolock` | `git diff $@ ":(exclude)package-lock.json" ":(exclude)\*.lock"` |
|
||||
| `gdt` | `git diff-tree --no-commit-id --name-only -r` |
|
||||
| `gf` | `git fetch` |
|
||||
| `gfa` | `git fetch --all --tags --prune` |
|
||||
| `gfa` | `git fetch --all --tags --prune --prune-tags --jobs=10` |
|
||||
| `gfo` | `git fetch origin` |
|
||||
| `gg` | `git gui citool` |
|
||||
| `gga` | `git gui citool --amend` |
|
||||
|
|
|
|||
|
|
@ -219,10 +219,17 @@ compdef _git gdnolock=git-diff
|
|||
|
||||
alias gdt='git diff-tree --no-commit-id --name-only -r'
|
||||
alias gf='git fetch'
|
||||
|
||||
# --prune-tags was added in git 2.17
|
||||
# --jobs=<n> was added in git 2.8
|
||||
is-at-least 2.8 "$git_version" \
|
||||
&& alias gfa='git fetch --all --tags --prune --jobs=10' \
|
||||
|| alias gfa='git fetch --all --tags --prune'
|
||||
if is-at-least 2.17 "$git_version"; then
|
||||
alias gfa='git fetch --all --tags --prune --prune-tags --jobs=10'
|
||||
elif is-at-least 2.8 "$git_version"; then
|
||||
alias gfa='git fetch --all --tags --prune --jobs=10'
|
||||
else
|
||||
alias gfa='git fetch --all --tags --prune'
|
||||
fi
|
||||
|
||||
alias gfo='git fetch origin'
|
||||
alias gg='git gui citool'
|
||||
alias gga='git gui citool --amend'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue