The shortest possible output from git log containing author and date

前端 未结 13 1715
我在风中等你
我在风中等你 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

    Run this in project folder:

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

    And if you like, add this line to your ~/.gitconfig:

    [alias]
        ...
        list = log --pretty=format:\"%C(yellow)%h %ar %C(auto)%d %Creset %s, %Cblue%cn\" --graph --all
    

提交回复
热议问题