Browse Source

heck-git-ui: enhance and split into basic-ui and extended-ui

master
heck 7 months ago
parent
commit
0357b2097d
  1. 51
      bash_profile.d/git.sh

51
bash_profile.d/git.sh

@ -1,32 +1,54 @@
#!/bin/bash #!/bin/bash
function heck_git_ui { function heck_git_ui {
# git basic # GIT BASIC UI
# ============
# clone # clone
alias gclone='git clone --recurse-submodules' alias gclone='git clone --recurse-submodules'
# fetch # fetch
alias gf='git fetch --all --tags' alias gf='git fetch --all --tags'
# pull # pull
alias gp='git 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 # show status
alias gs='git status --long' alias gs='git status --long'
# show diff of working copy vs. last commit # show diff of working copy vs. last commit
alias gd='git diff' 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 # show tags
alias gst='git for-each-ref --sort=creatordate --format "%(objectname) %(refname)" refs/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' alias gb='git branch'
# show branches # show branches
alias gsb='git branch -vv --all' 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 # log all branches
alias gla='gl --all' alias gla='gl --all'
# log long - show history long (only active branch) # log long - show history long (only active branch)
@ -37,15 +59,12 @@ function heck_git_ui {
alias gm='git merge --no-ff' alias gm='git merge --no-ff'
# rebase # rebase
alias grb='git rebase' alias grb='git rebase'
# switch to branch or tag
alias gco='git checkout'
# commit
alias gc='git commit'
# cherry-pick # cherry-pick
alias gcp='git cherry-pick' alias gcp='git cherry-pick'
# clean - remove untracked files # clean - remove untracked files
alias gclean='git clean -dxf' alias gclean='git clean -dxf'
# show remote
alias gsr='git remote --verbose'
# stats - commits by author # stats - commits by author
alias gstats='git shortlog -sne' alias gstats='git shortlog -sne'

Loading…
Cancel
Save