
1 changed files with 54 additions and 47 deletions
@ -1,55 +1,62 @@ |
|||||
#!/bin/bash |
#!/bin/bash |
||||
|
|
||||
# git |
function heck_git_ui { |
||||
alias gf='git fetch --all --tags' |
# git basic |
||||
alias gp='git pull' |
alias gf='git fetch --all --tags' |
||||
|
alias gp='git pull' |
||||
|
alias gpush='git push' |
||||
|
alias gpushf='git push --force' |
||||
|
alias gpusht='gpush; gpush --tags' |
||||
|
alias gpushtf='gpushf;gpushf --tags' |
||||
|
alias gs='git status --long' |
||||
|
alias gd='git diff' |
||||
|
alias gt='git tag' |
||||
|
alias gst='git for-each-ref --sort=creatordate --format "%(objectname) %(refname)" refs/tags' |
||||
|
alias gb='git branch' |
||||
|
alias gsb='git branch -vv --all' |
||||
|
alias gl='git log --graph --date=iso --topo-order --source --oneline' |
||||
|
alias gla='gl --all' |
||||
|
alias gll='git log --graph --date=iso --stat --topo-order --source' |
||||
|
alias glla='gll --all' |
||||
|
alias gm='git merge --no-ff' |
||||
|
alias grb='git rebase' |
||||
|
alias gco='git checkout' |
||||
|
alias gc='git commit' |
||||
|
alias gup='git pull --rebase --autostash -v' |
||||
|
alias gcp='git cherry-pick' |
||||
|
alias gclean='git clean -dxf' |
||||
|
|
||||
# git push |
# stats |
||||
alias gpush='git push' |
alias gstats='git shortlog -sne' |
||||
alias gpushf='git push --force' |
function gstatslines() { |
||||
alias gpusht='gpush; gpush --tags' |
echo -e "this usually takes a while.\nSo, go grab a coffee... or two... or three..." |
||||
alias gpushtf='gpushf;gpushf --tags' |
git ls-files | while read f; do { |
||||
# --all / -u |
git blame -wMCC --line-porcelain $f | grep -I '^author ' |
||||
alias gpau='gpush --all -u' |
}; done | sort -f | uniq -ic | sort -n --reverse |
||||
alias gpu='gpush -u' |
} |
||||
alias gpauf='gpushf --all -u' |
|
||||
alias gpuf='gpushf -u' |
|
||||
# with tags |
|
||||
alias gpaut='gpush --all -u;gpusht' |
|
||||
alias gput='gpush -u;gpusht' |
|
||||
alias gpauft='gpushf --all -u;gpushtf' |
|
||||
alias gpuft='gpushf -u;gpushtf' |
|
||||
|
|
||||
alias gs='git status --long' |
function gstats_libpEpAdapter_heck() { |
||||
alias gd='git diff' |
echo "libpEpAdapter: corrected lines of code for author heck, because he commited the sqlite3 amalgamation..." |
||||
alias gt='git tag' |
echo "$(gstatslines | grep 'author heck' | cut -f1 -d' ') - $(cat src/sqlite3.c src/internal/sqlite3.h | wc -l)" | bc |
||||
alias gst='git for-each-ref --sort=creatordate --format "%(objectname) %(refname)" refs/tags' |
} |
||||
alias gb='git branch' |
|
||||
alias gsb='git branch -vv --all' |
|
||||
alias gl='git log --graph --date=iso --topo-order --source --oneline' |
|
||||
alias gla='gl --all' |
|
||||
alias gll='git log --graph --date=iso --stat --topo-order --source' |
|
||||
alias glla='gll --all' |
|
||||
alias gm='git merge --no-ff' |
|
||||
alias grb='git rebase' |
|
||||
alias gco='git checkout' |
|
||||
alias gc='git commit' |
|
||||
alias gup='git pull --rebase --autostash -v' |
|
||||
alias gcp='git cherry-pick' |
|
||||
|
|
||||
# stats |
alias gstatsall='gstats;gstatslines' |
||||
alias gstats='git shortlog -sne' |
|
||||
function gstatslines() { |
|
||||
echo -e "this usually takes a while.\nSo, go grab a coffee... or two... or three..."; |
|
||||
git ls-files | while read f; do { |
|
||||
git blame -wMCC --line-porcelain $f | grep -I '^author '; |
|
||||
} done | sort -f | uniq -ic | sort -n --reverse |
|
||||
} |
|
||||
|
|
||||
function gstats_libpEpAdapter_heck() { |
# submodule |
||||
echo "libpEpAdapter: corrected lines of code for author heck, because he commited the sqlite3 amalgamation..." |
alias gsubpush='git submodule foreach "git push || :"' |
||||
echo "$(gstatslines | grep 'author heck' | cut -f1 -d' ') - $(cat src/sqlite3.c src/internal/sqlite3.h | wc -l)" | bc |
|
||||
} |
|
||||
|
|
||||
|
function heck_git_ui_deprecated { |
||||
|
# --all / -u |
||||
|
alias gpau='gpush --all -u' |
||||
|
alias gpu='gpush -u' |
||||
|
alias gpauf='gpushf --all -u' |
||||
|
alias gpuf='gpushf -u' |
||||
|
# with tags |
||||
|
alias gpaut='gpush --all -u;gpusht' |
||||
|
alias gput='gpush -u;gpusht' |
||||
|
alias gpauft='gpushf --all -u;gpushtf' |
||||
|
alias gpuft='gpushf -u;gpushtf' |
||||
|
} |
||||
|
} |
||||
|
|
||||
alias gstatsall='gstats;gstatslines' |
heck_git_ui |
Loading…
Reference in new issue