[开发] ohmyzsh的git插件常用git简写命令

原文

git plugin

简写对比表

AliasCommand
grtcd "$(git rev-parse --show-toplevel || echo .)"
ggpnpggl && ggp
ggpurggu
ggit
gagit add
gaagit add --all
gapagit add --patch
gaugit add --update
gavgit add --verbose
gwipgit add -A; git rm $(git ls-files --deleted) 2> /dev/null; git commit --no-verify --no-gpg-sign --message "--wip-- [skip ci]"
gamgit am
gamagit am --abort
gamcgit am --continue
gamscpgit am --show-current-patch
gamsgit am --skip
gapgit apply
gaptgit apply --3way
gbsgit bisect
gbsbgit bisect bad
gbsggit bisect good
gbsngit bisect new
gbsogit bisect old
gbsrgit bisect reset
gbssgit bisect start
gblgit blame -w
gbgit branch
gbagit branch --all
gbdgit branch --delete
gbDgit branch --delete --force
gbgdLANG=C git branch --no-color -vv | grep ": gone\]" | cut -c 3- | awk '"'"'{print $1}'"'"' | xargs git branch -d
gbgDLANG=C git branch --no-color -vv | grep ": gone\]" | cut -c 3- | awk '"'"'{print $1}'"'"' | xargs git branch -D
gbmgit branch --move
gbnmgit branch --no-merged
gbrgit branch --remote
ggsupgit branch --set-upstream-to=origin/$(git_current_branch)
gbgLANG=C git branch -vv | grep ": gone\]"
gcogit checkout
gcorgit checkout --recurse-submodules
gcbgit checkout -b
gcBgit checkout -B
gcdgit checkout $(git_develop_branch)
gcmgit checkout $(git_main_branch)
gcpgit cherry-pick
gcpagit cherry-pick --abort
gcpcgit cherry-pick --continue
gcleangit clean --interactive -d
gclgit clone --recurse-submodules
gccdgit clone --recurse-submodules "$@" && cd "$(basename $\_ .git)"
gcamgit commit --all --message
gcasgit commit --all --signoff
gcasmgit commit --all --signoff --message
gcmsggit commit --message
gcsmgit commit --signoff --message
gcgit commit --verbose
gcagit commit --verbose --all
gca!git commit --verbose --all --amend
gcan!git commit --verbose --all --no-edit --amend
gcans!git commit --verbose --all --signoff --no-edit --amend
gcann!git commit --verbose --all --date=now --no-edit --amend
gc!git commit --verbose --amend
gcn!git commit --verbose --no-edit --amend
gcsgit commit -S
gcssgit commit -S -s
gcssmgit commit -S -s -m
gcfgit config --list
gdctgit describe --tags $(git rev-list --tags --max-count=1)
gdgit diff
gdcagit diff --cached
gdcwgit diff --cached --word-diff
gdsgit diff --staged
gdwgit diff --word-diff
gdvgit diff -w "$@" | view -
gdupgit diff @{upstream}
gdnolockgit diff $@ ":(exclude)package-lock.json" ":(exclude)\*.lock"
gdtgit diff-tree --no-commit-id --name-only -r
gfgit fetch
gfagit fetch --all --prune
gfogit fetch origin
gggit gui citool
ggagit gui citool --amend
ghhgit help
glgggit log --graph
glggagit log --graph --decorate --all
glgmgit log --graph --max-count=10
glodgit log --graph --pretty='%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ad) %C(bold blue)<%an>%Creset'
glodsgit log --graph --pretty='%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ad) %C(bold blue)<%an>%Creset' --date=short
glolgit log --graph --pretty='%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ar) %C(bold blue)<%an>%Creset'
glolagit log --graph --pretty='%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ar) %C(bold blue)<%an>%Creset' --all
glolsgit log --graph --pretty='%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ar) %C(bold blue)<%an>%Creset' --stat
glogit log --oneline --decorate
gloggit log --oneline --decorate --graph
glogagit log --oneline --decorate --graph --all
glpgit log --pretty=<format>
glggit log --stat
glgpgit log --stat --patch
gignoredgit ls-files -v | grep "^[[:lower:]]"
gfggit ls-files | grep
gmgit merge
gmagit merge --abort
gmcgit merge --continue
gmsgit merge --squash
gmomgit merge origin/$(git_main_branch)
gmumgit merge upstream/$(git_main_branch)
gmtlgit mergetool --no-prompt
gmtlvimgit mergetool --no-prompt --tool=vimdiff
glgit pull
gprgit pull --rebase
gprvgit pull --rebase -v
gpragit pull --rebase --autostash
gpravgit pull --rebase --autostash -v
gpromgit pull --rebase origin $(git_main_branch)
gpromigit pull --rebase=interactive origin $(git_main_branch)
ggpullgit pull origin "$(git_current_branch)"
gglgit pull origin $(current_branch)
glucgit pull upstream $(git_current_branch)
glumgit pull upstream $(git_main_branch)
gpgit push
gpdgit push --dry-run
gpf!git push --force
ggfgit push --force origin $(current_branch)
gpfOn Git >= 2.30: git push --force-with-lease --force-if-includes
gpfOn Git < 2.30: git push --force-with-lease
ggflgit push --force-with-lease origin $(current_branch)
gpsupgit push --set-upstream origin $(git_current_branch)
gpsupfOn Git >= 2.30: git push --set-upstream origin $(git_current_branch) --force-with-lease --force-if-includes
gpsupfOn Git < 2.30: git push --set-upstream origin $(git_current_branch) --force-with-lease
gpvgit push --verbose
gpoatgit push origin --all && git push origin --tags
gpodgit push origin --delete
ggpushgit push origin "$(git_current_branch)"
ggpgit push origin $(current_branch)
gpugit push upstream
grbgit rebase
grbagit rebase --abort
grbcgit rebase --continue
grbigit rebase --interactive
grbogit rebase --onto
grbsgit rebase --skip
grbdgit rebase $(git_develop_branch)
grbmgit rebase $(git_main_branch)
grbomgit rebase origin/$(git_main_branch)
grfgit reflog
grgit remote
grvgit remote --verbose
gragit remote add
grrmgit remote remove
grmvgit remote rename
grsetgit remote set-url
grupgit remote update
grhgit reset
grugit reset --
grhhgit reset --hard
grhkgit reset --keep
grhsgit reset --soft
gpristinegit reset --hard && git clean --force -dfx
gwipegit reset --hard && git clean --force -df
grohgit reset origin/$(git_current_branch) --hard
grsgit restore
grssgit restore --source
grstgit restore --staged
gunwipgit rev-list --max-count=1 --format="%s" HEAD | grep -q "--wip--" && git reset HEAD~1
grevgit revert
grmgit rm
grmcgit rm --cached
gcountgit shortlog --summary -n
gshgit show
gspsgit show --pretty=short --show-signature
gstallgit stash --all
gstugit stash --include-untracked
gstaagit stash apply
gstcgit stash clear
gstdgit stash drop
gstlgit stash list
gstpgit stash pop
gstaOn Git >= 2.13: git stash push
gstaOn Git < 2.13: git stash save
gstsgit stash show --patch
gstgit status
gssgit status --short
gsbgit status --short -b
gsigit submodule init
gsugit submodule update
gsdgit svn dcommit
git-svn-dcommit-pushgit svn dcommit && git push github $(git_main_branch):svntrunk
gsrgit svn rebase
gswgit switch
gswcgit switch -c
gswdgit switch $(git_develop_branch)
gswmgit switch $(git_main_branch)
gtagit tag --annotate
gtsgit tag -s
gtvgit tag | sort -V
gignoregit update-index --assume-unchanged
gunignoregit update-index --no-assume-unchanged
gwchgit whatchanged -p --abbrev-commit --pretty=medium
gwtgit worktree
gwtlsgit worktree list
gwtmvgit worktree move
gwtrmgit worktree remove
gkgitk --all --branches &!
gkegitk --all $(git log --walk-reflogs --pretty=%h) &!
gtlgtl(){ git tag --sort=-v:refname -n --list ${1}\* }; noglob gtl
  • 2
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值