The shortest possible output from git log containing author and date

前端 未结 13 1665
我在风中等你
我在风中等你 2020-12-02 03:12

How can I show a git log output with (at least) this information:

* author
* commit date
* change

I want it compressed to one line per log

13条回答
  •  失恋的感觉
    2020-12-02 04:03

    Use predefined git alias, i.e.:

    $ git work
    

    Created once by command:

    $ git config --global alias.work 'log --pretty=format:"%h%x09%an%x09%ad%x09%s"'
    

    https://git-scm.com/book/tr/v2/Git-Basics-Git-Aliases

    Or more colored with graph:

    $ git config --global alias.work 'log --pretty=format:"%C(yellow)%h %ar %C(auto)%d %Creset %s , %Cblue%cn" --graph --all'
    

提交回复
热议问题