|
|
@ -1,32 +1,54 @@ |
|
|
|
#!/bin/bash |
|
|
|
|
|
|
|
function heck_git_ui { |
|
|
|
# git basic |
|
|
|
# GIT BASIC UI |
|
|
|
# ============ |
|
|
|
# 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' |
|
|
|
|
|
|
|
# log - show history (only active branch) |
|
|
|
alias gl='git log --graph --date=iso --topo-order --source --oneline' |
|
|
|
# show tags |
|
|
|
alias gst='git for-each-ref --sort=creatordate --format "%(objectname) %(refname)" refs/tags' |
|
|
|
# create banrch |
|
|
|
# switch to branch or tag |
|
|
|
alias gco='git checkout' |
|
|
|
|
|
|
|
# add |
|
|
|
alias gadd='git add' |
|
|
|
# commit |
|
|
|
alias gc='git commit' |
|
|
|
|
|
|
|
# push |
|
|
|
alias gpush='git push' |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# GIT EXTENDED UI |
|
|
|
# =============== |
|
|
|
# clone |
|
|
|
alias gclonebare='git clone --bare' |
|
|
|
alias gclonebaremirror='git clone --mirror' |
|
|
|
# push |
|
|
|
alias gpushf='git push --force' |
|
|
|
alias gpusht='gpush; gpush --tags' |
|
|
|
alias gpushtf='gpushf;gpushf --tags' |
|
|
|
# tag create |
|
|
|
alias gt='git tag' |
|
|
|
# tag delete |
|
|
|
alias gtd='git tag --delete' |
|
|
|
# create branch |
|
|
|
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) |
|
|
@ -37,15 +59,12 @@ function heck_git_ui { |
|
|
|
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' |
|
|
|
# cherry-pick |
|
|
|
alias gcp='git cherry-pick' |
|
|
|
# clean - remove untracked files |
|
|
|
alias gclean='git clean -dxf' |
|
|
|
|
|
|
|
# show remote |
|
|
|
alias gsr='git remote --verbose' |
|
|
|
|
|
|
|
# stats - commits by author |
|
|
|
alias gstats='git shortlog -sne' |
|
|
|