0
0
Fork 0
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:
Joran Van Belle 2024-07-17 14:37:33 +02:00
parent be10a91277
commit 7d3a702b15
2 changed files with 10 additions and 1 deletions

View file

@ -11,7 +11,7 @@ plugins=(... git)
## Aliases
| Alias | Command |
| :--------------------- | :------------------------------------------------------------------------------------------------------------------------------ |
|:-----------------------|:--------------------------------------------------------------------------------------------------------------------------------|
| `grt` | `cd "$(git rev-parse --show-toplevel \|\| echo .)"` |
| `ggpnp` | `ggl && ggp` |
| `ggpur` | `ggu` |
@ -205,6 +205,7 @@ plugins=(... git)
| `gta` | `git tag --annotate` |
| `gts` | `git tag -s` |
| `gtv` | `git tag \| sort -V` |
| `gtc` | `git tag -a <tagName> -m <message/tagName>` |
| `gignore` | `git update-index --assume-unchanged` |
| `gunignore` | `git update-index --no-assume-unchanged` |
| `gwch` | `git whatchanged -p --abbrev-commit --pretty=medium` |

View file

@ -327,6 +327,13 @@ function ggp() {
}
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 grb='git rebase'
alias grba='git rebase --abort'
@ -391,6 +398,7 @@ alias gswm='git switch $(git_main_branch)'
alias gta='git tag --annotate'
alias gts='git tag --sign'
alias gtv='git tag | sort -V'
alias gtc='git_tag_add'
alias gignore='git update-index --assume-unchanged'
alias gunignore='git update-index --no-assume-unchanged'
alias gwch='git whatchanged -p --abbrev-commit --pretty=medium'