Skip to content

Querying and Reporting

Michael Schenk edited this page Oct 29, 2016 · 1 revision
Usage: gtm report [options] ...
Report on time logged

Report Formats

-format string
  Specify report format [commits|files|timeline-hours|timeline-commits] (default "commits")
-color
  Always output color even if no terminal is detected, i.e 'gtm report -color | less -R'
Commits
7129f00 Remove post processing of status Fri Sep 09 20:45:03 2016 -0500 gtm-vim-plugin Michael Schenk 20m 40s 53% [m] plugin/gtm.vim 18m 5s 46% [r] Terminal 15s 1% [m] .gitignore 39m 0s gtm-vim-plugin
Files
2h 29m 40s 33% README.md 1h 45m 54s 24% report/report.go 1h 35m 0s 21% Terminal 1h 2m 54s 14% report/query.go 13m 55s 3% report/timeline.go 12m 45s 3% report/templates.go 5m 0s 1% command/report.go 1m 12s 0% main.go 40s 0% note/note.go 7h 27m 0s
Timeline Hours
00.01.02.03.04.05.06.07.08.09.10.11.12.01.02.03.04.05.06.07.08.09.10.11. ------------------------------------------------------------------------ Sat Oct 08 | ▃▃▃ | 17m 0s ------------------------------------------------------------------------ Sun Oct 09 | ▁▁▁ █████████▃▃▃██████▂▂▂ ▂▂▂ | 5h 33m 0s ------------------------------------------------------------------------ Tue Oct 11 | ▂▂▂ ▂▂▂ | 16m 0s ------------------------------------------------------------------------ Fri Oct 14 | ▂▂▂ | 13m 0s ------------------------------------------------------------------------ Sat Oct 15 | ███▇▇▇███▇▇▇███▁▁▁▇▇▇▂▂▂▁▁▁▃▃▃▆▆▆███▇▇▇ | 8h 11m 0s ------------------------------------------------------------------------ 14h 30m 0s
Timeline Commits
00.01.02.03.04.05.06.07.08.09.10.11.12.01.02.03.04.05.06.07.08.09.10.11. ------------------------------------------------------------------------ Sat Oct 22 | ▇▇▇▁▁▁ | 7 ------------------------------------------------------------------------ Sat Oct 29 | ▃▃▃▇▇▇ | 8 ------------------------------------------------------------------------ 15

Commit Limiting

-after string
  Show commits more recent than a specific date
-author string
  Show commits which contain author substring
-before string
  Show commits older than a specific date
-full-message
  Include full commit message
-last-month
  Show commits for last month
-last-week
  Show commits for last week
-last-year
  Show commits for last year
-message string
  Show commits which contain message substring
-n int
  Limit output, 0 is no limits, defaults to 1 when no limiting flags (i.e. -today, -author, etc) otherwise defaults to 0
-terminal-off
  Exclude time spent in terminal (Terminal plugin is required)
-this-month
  Show commits for this month
-this-week
  Show commits for this week
-this-year
  Show commits for this year
-today
  Show commits for today
-yesterday
  Show commits for yesterday

Multi-Project Reporting

-tags string
  Project tags to report on, i.e --tags tag1,tag2
-all
  Show commits for all projects

Pipe Git Log

git log --pretty=%H --since="8 days ago" | gtm report

The commit limiting options above should cover most needs for limiting output but you can optionally pipe git log output and use the limiting options.

Clone this wiki locally