Git查看日志的3条命令

290 阅读1分钟
  • git log

  • git log --oneline

  • 设置git log 别名

    1. code ~/.gitconfig
    2. 设置别名
    [alias]
            log-tree = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
    
    1. 查看效果

image.png