|
|
@ -2,32 +2,55 @@ |
|
|
|
|
|
|
|
function heck_git_ui { |
|
|
|
# git basic |
|
|
|
# clone |
|
|
|
alias gclone='git clone --recurse-submodules' |
|
|
|
# fetch |
|
|
|
alias gf='git fetch --all --tags' |
|
|
|
# pull |
|
|
|
alias gp='git pull' |
|
|
|
# push |
|
|
|
alias gpush='git push' |
|
|
|
alias gpushf='git push --force' |
|
|
|
alias gpusht='gpush; gpush --tags' |
|
|
|
alias gpushtf='gpushf;gpushf --tags' |
|
|
|
# show status |
|
|
|
alias gs='git status --long' |
|
|
|
# show diff of working copy vs. last commit |
|
|
|
alias gd='git diff' |
|
|
|
# create tag |
|
|
|
alias gt='git tag' |
|
|
|
# show tags |
|
|
|
alias gst='git for-each-ref --sort=creatordate --format "%(objectname) %(refname)" refs/tags' |
|
|
|
# create banrch |
|
|
|
alias gb='git branch' |
|
|
|
# show branches |
|
|
|
alias gsb='git branch -vv --all' |
|
|
|
# log - show history (only active branch) |
|
|
|
alias gl='git log --graph --date=iso --topo-order --source --oneline' |
|
|
|
# log all branches |
|
|
|
alias gla='gl --all' |
|
|
|
# log long - show history long (only active branch) |
|
|
|
alias gll='git log --graph --date=iso --stat --topo-order --source' |
|
|
|
# log long all - show history long (all branches) |
|
|
|
alias glla='gll --all' |
|
|
|
# merge |
|
|
|
alias gm='git merge --no-ff' |
|
|
|
# rebase |
|
|
|
alias grb='git rebase' |
|
|
|
# switch to branch or tag |
|
|
|
alias gco='git checkout' |
|
|
|
# commit |
|
|
|
alias gc='git commit' |
|
|
|
alias gup='git pull --rebase --autostash -v' |
|
|
|
# cherry-pick |
|
|
|
alias gcp='git cherry-pick' |
|
|
|
# clean - remove untracked files |
|
|
|
alias gclean='git clean -dxf' |
|
|
|
|
|
|
|
# stats |
|
|
|
|
|
|
|
# stats - commits by author |
|
|
|
alias gstats='git shortlog -sne' |
|
|
|
|
|
|
|
# stats - lines of code by author |
|
|
|
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 { |
|
|
@ -35,11 +58,7 @@ function heck_git_ui { |
|
|
|
}; done | sort -f | uniq -ic | sort -n --reverse |
|
|
|
} |
|
|
|
|
|
|
|
function gstats_libpEpAdapter_heck() { |
|
|
|
echo "libpEpAdapter: corrected lines of code for author heck, because he commited the sqlite3 amalgamation..." |
|
|
|
echo "$(gstatslines | grep 'author heck' | cut -f1 -d' ') - $(cat src/sqlite3.c src/internal/sqlite3.h | wc -l)" | bc |
|
|
|
} |
|
|
|
|
|
|
|
# stats - commits and lines of code |
|
|
|
alias gstatsall='gstats;gstatslines' |
|
|
|
|
|
|
|
# submodule |
|
|
|