git log // 普通查日志 git log --oneline // 简化输出 git log --pretty=oneline -3 // 指定输出行数 git shortlog // 输出汇总信息,以作者进行分类 git shortlog -s // 统计每个作者的commit数量 git shortlog -n // 用来对统计的量进行倒序排列 git log --author [authorname]// 用来过滤commit,限定输出给定的用户开始结束时间
git shortlog -s --since="2020-01-08" --until="2020-01-13" "HEAD"
./gitstats -c start_date=2023-03-10 -c end_date=2023-03-23 meta-codes/dev/umi-mo meta-reports/dev/umi-mo
if len(conf['start_date']) > 0: #return '--since="%s" "%s"' % (conf['start_date'], commit_range) return '--since="%s" --until="%s" "%s"' % (conf['start_date'], conf['end_date'],commit_range)[root@jenkins-master gitstats]# gitstats -c start_date=2023-03-10 meta-codes/dev/umi-mo meta-reports/dev/umi-mo [0.01286] >> gnuplot --version Output path: /home/data/gitstats/meta-reports/dev/umi-mo Loading cache... Git path: meta-codes/dev/umi-mo Collecting data... [0.00714] >> git shortlog -s --since="2023-03-10" "HEAD" | wc -l [0.00566] >> git show-ref --tags [0.00711] >> git rev-list --pretty=format:"%at %ai %aN <%aE>" --since="2023-03-10" "HEAD" | grep -v ^commit [0.00737] >> git rev-list --pretty=format:"%at %T" --since="2023-03-10" "HEAD" | grep -v ^commit [0.00902] >> git ls-tree -r -l -z HEAD [0.01839] >> git log --shortstat --first-parent -m --pretty=format:"%at %aN" --since="2023-03-10" "HEAD" [0.01758] >> git log --shortstat --date-order --pretty=format:"%at %aN" --since="2023-03-10" "HEAD" Refining data... Saving cache... Generating report... Warning: "gitstats.css" not found, so not copied (searched: ['/usr/local/bin', '/usr/local/bin/../share/gitstats', '/usr/share/gitstats']) Warning: "sortable.js" not found, so not copied (searched: ['/usr/local/bin', '/usr/local/bin/../share/gitstats', '/usr/share/gitstats']) Warning: "arrow-up.gif" not found, so not copied (searched: ['/usr/local/bin', '/usr/local/bin/../share/gitstats', '/usr/share/gitstats']) Warning: "arrow-down.gif" not found, so not copied (searched: ['/usr/local/bin', '/usr/local/bin/../share/gitstats', '/usr/share/gitstats']) Warning: "arrow-none.gif" not found, so not copied (searched: ['/usr/local/bin', '/usr/local/bin/../share/gitstats', '/usr/share/gitstats']) >> git --git-dir=/usr/local/bin/.git --work-tree=/usr/local/bin rev-parse --short HEADfatal: Not a git repository: '/usr/local/bin/.git' [0.00609] >> git --git-dir=/usr/local/bin/.git --work-tree=/usr/local/bin rev-parse --short HEAD [0.00599] >> git --version [0.01396] >> gnuplot --version Generating graphs... [0.02418] >> gnuplot "/home/data/gitstats/meta-reports/dev/umi-mo/hour_of_day.plot" [0.02561] >> gnuplot "/home/data/gitstats/meta-reports/dev/umi-mo/day_of_week.plot" [0.02435] >> gnuplot "/home/data/gitstats/meta-reports/dev/umi-mo/domains.plot" [0.02639] >> gnuplot "/home/data/gitstats/meta-reports/dev/umi-mo/month_of_year.plot" [0.02603] >> gnuplot "/home/data/gitstats/meta-reports/dev/umi-mo/commits_by_year_month.plot" [0.02424] >> gnuplot "/home/data/gitstats/meta-reports/dev/umi-mo/commits_by_year.plot" [0.02722] >> gnuplot "/home/data/gitstats/meta-reports/dev/umi-mo/files_by_date.plot" [0.02744] >> gnuplot "/home/data/gitstats/meta-reports/dev/umi-mo/lines_of_code.plot" [0.03248] >> gnuplot "/home/data/gitstats/meta-reports/dev/umi-mo/lines_of_code_by_author.plot" [0.03264] >> gnuplot "/home/data/gitstats/meta-reports/dev/umi-mo/commits_by_author.plot" Execution time 0.66406 secs, 0.38175 secs (57.49 %) in external commands) You may now run: sensible-browser '/home/data/gitstats/meta-reports/dev/umi-mo/index.html'