How do I view all commits for a specific day?

前端 未结 5 1767
天涯浪人
天涯浪人 2020-11-30 17:22

I\'ve already looked at the relevant docs from git-scm.com and gitref.org, but I can\'t seem to figure this out.

Let\'s say I want to get all commits for Tuesday, N

5条回答
  •  甜味超标
    2020-11-30 17:57

    I made a git alias for that specific purpose:

    commitsAtDate = "!f() { git log --pretty='format:%C(yellow)%h %G? %ad%Cred%d %Creset%s%C(cyan) [%cn]' --decorate --after=\"$1 0:00\" --before=\"$1 23:59\" --author \"`git config user.name`\"; }; f"
    

    Usage:

    git commitsAtDate 2017-08-18
    

提交回复
热议问题