mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-09-19 04:01:21 +02:00
feat(git): add support for tag creation
This commit is contained in:
parent
be10a91277
commit
7d3a702b15
2 changed files with 10 additions and 1 deletions
|
@ -11,7 +11,7 @@ plugins=(... git)
|
||||||
## Aliases
|
## Aliases
|
||||||
|
|
||||||
| Alias | Command |
|
| Alias | Command |
|
||||||
| :--------------------- | :------------------------------------------------------------------------------------------------------------------------------ |
|
|:-----------------------|:--------------------------------------------------------------------------------------------------------------------------------|
|
||||||
| `grt` | `cd "$(git rev-parse --show-toplevel \|\| echo .)"` |
|
| `grt` | `cd "$(git rev-parse --show-toplevel \|\| echo .)"` |
|
||||||
| `ggpnp` | `ggl && ggp` |
|
| `ggpnp` | `ggl && ggp` |
|
||||||
| `ggpur` | `ggu` |
|
| `ggpur` | `ggu` |
|
||||||
|
@ -205,6 +205,7 @@ plugins=(... git)
|
||||||
| `gta` | `git tag --annotate` |
|
| `gta` | `git tag --annotate` |
|
||||||
| `gts` | `git tag -s` |
|
| `gts` | `git tag -s` |
|
||||||
| `gtv` | `git tag \| sort -V` |
|
| `gtv` | `git tag \| sort -V` |
|
||||||
|
| `gtc` | `git tag -a <tagName> -m <message/tagName>` |
|
||||||
| `gignore` | `git update-index --assume-unchanged` |
|
| `gignore` | `git update-index --assume-unchanged` |
|
||||||
| `gunignore` | `git update-index --no-assume-unchanged` |
|
| `gunignore` | `git update-index --no-assume-unchanged` |
|
||||||
| `gwch` | `git whatchanged -p --abbrev-commit --pretty=medium` |
|
| `gwch` | `git whatchanged -p --abbrev-commit --pretty=medium` |
|
||||||
|
|
|
@ -327,6 +327,13 @@ function ggp() {
|
||||||
}
|
}
|
||||||
compdef _git ggp=git-checkout
|
compdef _git ggp=git-checkout
|
||||||
|
|
||||||
|
function git_tag_add() {
|
||||||
|
local tagName=$1
|
||||||
|
local message=${2:-$tagName}
|
||||||
|
|
||||||
|
git tag -a "$tagName" -m "$message"
|
||||||
|
}
|
||||||
|
|
||||||
alias gpu='git push upstream'
|
alias gpu='git push upstream'
|
||||||
alias grb='git rebase'
|
alias grb='git rebase'
|
||||||
alias grba='git rebase --abort'
|
alias grba='git rebase --abort'
|
||||||
|
@ -391,6 +398,7 @@ alias gswm='git switch $(git_main_branch)'
|
||||||
alias gta='git tag --annotate'
|
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 gtc='git_tag_add'
|
||||||
alias gignore='git update-index --assume-unchanged'
|
alias gignore='git update-index --assume-unchanged'
|
||||||
alias gunignore='git update-index --no-assume-unchanged'
|
alias gunignore='git update-index --no-assume-unchanged'
|
||||||
alias gwch='git whatchanged -p --abbrev-commit --pretty=medium'
|
alias gwch='git whatchanged -p --abbrev-commit --pretty=medium'
|
||||||
|
|
Loading…
Reference in a new issue