git log 上色

This commit is contained in:
chenyc 2022-12-14 15:41:35 +08:00
parent e49b5d4644
commit 7169ff0910
1 changed files with 3 additions and 3 deletions

View File

@ -12,7 +12,7 @@ alias glt='git tag -n --sort=taggerdate | tail -n ${1-10}'
gat() { git tag -a $1 -m "$2" }
gam() { git add --all && git commit -m "$*" }
gitlog() {
git --no-pager log --date=format:'%Y-%m-%d %H:%M:%S' --pretty=format:$1 --graph -n ${2-10} \
git --no-pager log --date=format:'%Y-%m-%d %H:%M' --pretty=format:$1 --graph -n ${2-10} \
}
gll() { gitlog "%h %s" $1 }
glll() { gitlog "%h %cd %cn: %s" $1 }
gll() { gitlog "%C(magenta)%h %C(cyan)%s%Creset" $1 }
glll() { gitlog "%C(magenta)%h %C(yellow)%cd %Cblue%cn: %C(cyan)%s%Creset" $1 }