Merge pull request #1 from YichaoDeng/fix-gitlog-format

更新gitlog的format格式
This commit is contained in:
chenyc 2023-01-24 13:59:08 +08:00 committed by GitHub
commit e6fd5ab2a1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

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