Answers: <p><a href="https://github.com/git-time-metric/gtm" rel="nofollow noreferrer">git-time-metric</a> is a set of tools that allow to track time on Git.</p>
  <p>The latest release can be installed automatically using brew or manually by installing the executables listed <a href="https://github.com/git-time-metric/gtm/releases/tag/v1.3.5" rel="nofollow noreferrer">here</a>.</p>
  <p>gtm must first be initialized (<code>gtm init</code>) from with the git project directory to allow time tracking.
  When you commit your work, gtm then saves the time associated with your commit.</p>
  <p>The time can be displayed using the <code>gtm report</code> command; <code>format</code> argument <code>timeline-hours</code> allows to create a Gantt chart.</p>
  <p>On a side note, I am not sure whether <code>gtm</code> can help with <em>existing</em> projects. I tried running it onto one of my repos and it logged <code>0s</code> for all my previous commits.</p>
  
Answers: CC BY-SA 4.0
Answers: 2022-10-20T21:52:36.030Z
Answers: Thank you for this. Can I see an example query that would return the data I seek in the question? :) Preferably with an option to format the output in a machine-oriented format, like JSON, so I can make nice pretty graphs. ;)
Answers: Jesse Adelman
Answers: CC BY-SA 4.0
Answers: 2022-10-14T03:51:05.323Z
Answers: 2022-10-14T04:21:41.820Z
Answers: 2022-10-14T04:21:41.820Z
Answers: Sheldon
Body: <p>I would like to easily query git to answer a question like the following:</p>
  <p>How much time passed from when a developer made a git commit to when that commit was merged to a default branch from a feature branch (if that pattern is being used) or was tagged with a particular tag (for trunk-based development)?</p>
  <p>At a higher level, my goal is to see how much time it takes for code to leave a developer's fingers to actually reach production.</p>
  <p>Thanks!</p>
  
Tags: <git>
Title: Gathering timespan statistics from Git
UserDisplayName: Jesse Adelman
ThreadText: # Gathering timespan statistics from Git
  
  (Asked by: username_0 on 2022-10-12)
  
  I would like to easily query git to answer a question like the following:
  
  How much time passed from when a developer made a git commit to when that commit was merged to a default branch from a feature branch (if that pattern is being used) or was tagged with a particular tag (for trunk-based development)?
  
  At a higher level, my goal is to see how much time it takes for code to leave a developer's fingers to actually reach production.
  
  Thanks!
  
  **Tags:** git
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2022-10-14. Score: 2
  
  [git-time-metric](https://github.com/git-time-metric/gtm) is a set of tools that allow to track time on Git.
  
  The latest release can be installed automatically using brew or manually by installing the executables listed [here](https://github.com/git-time-metric/gtm/releases/tag/v1.3.5).
  
  gtm must first be initialized (`gtm init`) from with the git project directory to allow time tracking.
  When you commit your work, gtm then saves the time associated with your commit.
  
  The time can be displayed using the `gtm report` command; `format` argument `timeline-hours` allows to create a Gantt chart.
  
  On a side note, I am not sure whether `gtm` can help with *existing* projects. I tried running it onto one of my repos and it logged `0s` for all my previous commits.
  
  > **Comments:**
  > **username_0**: Thank you for this. Can I see an example query that would return the data I seek in the question? :) Preferably with an option to format the output in a machine-oriented format, like JSON, so I can make nice pretty graphs. ;)  
  
  ---
  
  