Git Time Metrics (GTM) is a tool to automatically track time spent reading and working on code that you store in a Git repository. By installing GTM and using supported plug-ins for your favorite editors, you can immediately realize better insight into how you are spending your time and on what files.
Installing GTM is a two step process. First, it's recommended you install the GTM executable that the plug-in integrates with and then install the JetBrains GTM plug-in. Please submit an issue if you have any problems and/or questions.
- Follow the Getting Started section to install the GTM executable for your operating system. This plug-in looks for the gtm executable in the following locations:
- Windows Search Path
%PATH%;\ProgramFiles\gtm;\ProgramFiles(x86)\gtm;<homedir>\gtm
- *nix Search Path (includes macOS)
$PATH:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:~/bin:~/local/bin
- Install the plug-in from your JetBrains IDE, select
Preferences
->Plugins
->Browse Repositories...
and search forGit Time Metric
.
Note - to enable time tracking for a Git repository, you need to initialize it with gtm init
otherwise it will be ignored by GTM. This is done via the command line. You can run this within the JetBrains IDE terminal.
> cd /path/to/your/project
> gtm init
Consult the README and Wiki for more information.
In the status bar see your total time spent for in-process work (uncommitted).
Note - the time shown is based on the file's path and the Git repository it belongs to. You can have several files open that belong to different Git repositories. The status bar will display the time for the current file's Git repository. Also keep in mind, a Git repository must be initialized for time tracking in order to track time.
Use the command line to report on time logged for your commits.
Here are some examples of insights GTM can provide you.
GTM is automatic, seamless and lightweight. There is no need to remember to start and stop timers. It runs on occasion to capture activity triggered by your editor. The time metrics are stored locally with the git repository as Git notes and can be pushed to the remote repository.
To report a bug, please submit an issue on the GitHub Page