Update 30.01.2022
This commit is contained in:
@@ -47,6 +47,7 @@ plugins=(... git)
|
||||
| gcb | git checkout -b |
|
||||
| gcf | git config --list |
|
||||
| gcl | git clone --recurse-submodules |
|
||||
| gccd | git clone --recurse-submodules "$@" && cd "$(basename $_ .git)" |
|
||||
| gclean | git clean -id |
|
||||
| gpristine | git reset --hard && git clean -dffx |
|
||||
| gcm | git checkout $(git_main_branch) |
|
||||
@@ -66,7 +67,7 @@ plugins=(... git)
|
||||
| gds | git diff --staged |
|
||||
| gdt | git diff-tree --no-commit-id --name-only -r |
|
||||
| gdnolock | git diff $@ ":(exclude)package-lock.json" ":(exclude)*.lock" |
|
||||
| gdu | git diff @{u} |
|
||||
| gdup | git diff @{upstream} |
|
||||
| gdv | git diff -w $@ \| view - |
|
||||
| gdw | git diff --word-diff |
|
||||
| gf | git fetch |
|
||||
@@ -90,8 +91,8 @@ plugins=(... git)
|
||||
| gignore | git update-index --assume-unchanged |
|
||||
| gignored | git ls-files -v \| grep "^[[:lower:]]" |
|
||||
| git-svn-dcommit-push | git svn dcommit && git push github $(git_main_branch):svntrunk |
|
||||
| gk | gitk --all --branches |
|
||||
| gke | gitk --all $(git log -g --pretty=%h) |
|
||||
| gk | gitk --all --branches &! |
|
||||
| gke | gitk --all $(git log -g --pretty=%h) &! |
|
||||
| gl | git pull |
|
||||
| glg | git log --stat |
|
||||
| glgp | git log --stat -p |
|
||||
@@ -129,6 +130,7 @@ plugins=(... git)
|
||||
| grbd | git rebase $(git_develop_branch) |
|
||||
| grbi | git rebase -i |
|
||||
| grbm | git rebase $(git_main_branch) |
|
||||
| grbom | git rebase origin/$(git_main_branch) |
|
||||
| grbo | git rebase --onto |
|
||||
| grbs | git rebase --skip |
|
||||
| grev | git revert |
|
||||
@@ -168,6 +170,8 @@ plugins=(... git)
|
||||
| gsu | git submodule update |
|
||||
| gsw | git switch |
|
||||
| gswc | git switch -c |
|
||||
| gswm | git switch $(git_main_branch) |
|
||||
| gswd | git switch $(git_develop_branch) |
|
||||
| gts | git tag -s |
|
||||
| gtv | git tag \| sort -V |
|
||||
| gtl | gtl(){ git tag --sort=-v:refname -n -l ${1}* }; noglob gtl |
|
||||
|
||||
@@ -24,9 +24,7 @@ compdef _git _git_log_prettily=git-log
|
||||
|
||||
# Warn if the current branch is a WIP
|
||||
function work_in_progress() {
|
||||
if $(git log -n 1 2>/dev/null | grep -q -c "\-\-wip\-\-"); then
|
||||
echo "WIP!!"
|
||||
fi
|
||||
command git -c log.showSignature=false log -n 1 2>/dev/null | grep -q -- "--wip--" && echo "WIP!!"
|
||||
}
|
||||
|
||||
# Check if main exists and use instead of master
|
||||
@@ -97,6 +95,13 @@ alias gcas='git commit -a -s'
|
||||
alias gcasm='git commit -a -s -m'
|
||||
alias gcb='git checkout -b'
|
||||
alias gcf='git config --list'
|
||||
|
||||
function gccd() {
|
||||
command git clone --recurse-submodules "$@"
|
||||
[[ -d "$_" ]] && cd "$_" || cd "${${_:t}%.git}"
|
||||
}
|
||||
compdef _git gccd=git-clone
|
||||
|
||||
alias gcl='git clone --recurse-submodules'
|
||||
alias gclean='git clean -id'
|
||||
alias gpristine='git reset --hard && git clean -dffx'
|
||||
@@ -119,7 +124,7 @@ alias gdcw='git diff --cached --word-diff'
|
||||
alias gdct='git describe --tags $(git rev-list --tags --max-count=1)'
|
||||
alias gds='git diff --staged'
|
||||
alias gdt='git diff-tree --no-commit-id --name-only -r'
|
||||
alias gdu='git diff @{u}'
|
||||
alias gdup='git diff @{upstream}'
|
||||
alias gdw='git diff --word-diff'
|
||||
|
||||
function gdnolock() {
|
||||
@@ -201,8 +206,8 @@ alias gignore='git update-index --assume-unchanged'
|
||||
alias gignored='git ls-files -v | grep "^[[:lower:]]"'
|
||||
alias git-svn-dcommit-push='git svn dcommit && git push github $(git_main_branch):svntrunk'
|
||||
|
||||
alias gk='\gitk --all --branches'
|
||||
alias gke='\gitk --all $(git log -g --pretty=%h)'
|
||||
alias gk='\gitk --all --branches &!'
|
||||
alias gke='\gitk --all $(git log -g --pretty=%h) &!'
|
||||
|
||||
alias gl='git pull'
|
||||
alias glg='git log --stat'
|
||||
@@ -244,6 +249,7 @@ alias grbc='git rebase --continue'
|
||||
alias grbd='git rebase $(git_develop_branch)'
|
||||
alias grbi='git rebase -i'
|
||||
alias grbm='git rebase $(git_main_branch)'
|
||||
alias grbom='git rebase origin/$(git_main_branch)'
|
||||
alias grbo='git rebase --onto'
|
||||
alias grbs='git rebase --skip'
|
||||
alias grev='git revert'
|
||||
@@ -288,6 +294,8 @@ alias gstall='git stash --all'
|
||||
alias gsu='git submodule update'
|
||||
alias gsw='git switch'
|
||||
alias gswc='git switch -c'
|
||||
alias gswm='git switch $(git_main_branch)'
|
||||
alias gswd='git switch $(git_develop_branch)'
|
||||
|
||||
alias gts='git tag -s'
|
||||
alias gtv='git tag | sort -V'
|
||||
|
||||
Reference in New Issue
Block a user