glogs als funktion
This commit is contained in:
parent
4cf97b17f1
commit
f51e10153f
1 changed files with 11 additions and 1 deletions
12
.bash_extra
12
.bash_extra
|
@ -203,6 +203,17 @@ EOF
|
|||
;;
|
||||
esac
|
||||
}
|
||||
function glogs {
|
||||
# https://git-scm.com/docs/pretty-formats
|
||||
# https://stackoverflow.com/questions/3631005/git-log-tabular-formatting
|
||||
# https://stackoverflow.com/questions/7736781/how-to-make-git-log-not-prompt-to-continue
|
||||
if [ -z "$1" ]; then
|
||||
ncommits=30
|
||||
else
|
||||
ncommits="$1"
|
||||
fi
|
||||
git --no-pager log --pretty=format:'%C(auto) %<|(16,trunc)%h %<|(60,trunc)%s %Cgreen%cr%Creset by %Cblue%an%Creset' --graph --all -$ncommits
|
||||
}
|
||||
### Aliase
|
||||
# tmux
|
||||
alias tmuxa="tmux a -t "
|
||||
|
@ -233,7 +244,6 @@ alias gf="git fetch"
|
|||
alias gdel="git add . && git stash && git stash clear"
|
||||
alias glast="git log -1 HEAD --stat"
|
||||
alias gd="git diff"
|
||||
alias glogs="git log --all --graph --pretty=format:'%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative"
|
||||
# vim
|
||||
alias v="view"
|
||||
# docker
|
||||
|
|
Loading…
Reference in a new issue