
git log // 普通查日志 git log --oneline // 简化输出 git log --prettyoneline -3 // 指定输出行数 git shortlog // 输出汇总信息以作者进行分类 git shortlog -s // 统计每个作者的commit数量 git shortlog -n // 用来对统计的量进行倒序排列 git log --author [authorname]// 用来过滤commit,限定输出给定的用户开始结束时间git shortlog -s --since2020-01-08 --until2020-01-13 HEAD./gitstats -c start_date2023-03-10 -c end_date2023-03-23 meta-codes/dev/umi-mo meta-reports/dev/umi-moif 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)[rootjenkins-master gitstats]# gitstats -c start_date2023-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 --since2023-03-10 HEAD | wc -l [0.00566] git show-ref --tags [0.00711] git rev-list --prettyformat:%at %ai %aN %aE --since2023-03-10 HEAD | grep -v ^commit [0.00737] git rev-list --prettyformat:%at %T --since2023-03-10 HEAD | grep -v ^commit [0.00902] git ls-tree -r -l -z HEAD [0.01839] git log --shortstat --first-parent -m --prettyformat:%at %aN --since2023-03-10 HEAD [0.01758] git log --shortstat --date-order --prettyformat:%at %aN --since2023-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