From 0357b2097d066714802817d54547d607670dab1b Mon Sep 17 00:00:00 2001 From: heck Date: Sat, 7 Sep 2024 01:29:50 +0200 Subject: [PATCH] heck-git-ui: enhance and split into basic-ui and extended-ui --- bash_profile.d/git.sh | 51 +++++++++++++++++++++++++++++-------------- 1 file changed, 35 insertions(+), 16 deletions(-) diff --git a/bash_profile.d/git.sh b/bash_profile.d/git.sh index 4288ed9..02ed16c 100644 --- a/bash_profile.d/git.sh +++ b/bash_profile.d/git.sh @@ -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'