How can I make git log order based on author's timestamp?

后端 未结 4 497
迷失自我
迷失自我 2020-12-04 23:16

I use a fairly complex git-log command involving --date-order to get an overview of my repository\'s status; but unfortunately, --date-order<

4条回答
  •  旧时难觅i
    2020-12-05 00:01

    Building off of what jørgensen suggested there is a "one-liner" solution that may give you what you are looking for. Formatted here for easier viewing. Improvements are welcomed!

    SORTED_GIT_LOGS=$(git log --pretty="format:%at %H" | sort -g | cut -d' ' -f2); \
        IFS=$(echo -en "\n\b"); for LOG in $SORTED_GIT_LOGS; do \
            git show --name-only $LOG; \
        done | less
    

提交回复
热议问题