dev-master
9999999-dev
The Requires
v0.3.0
0.3.0.0
The Requires
0.2.0
0.2.0.0
The Requires
Wallogit.com
2017 © Pedro Peláez
git time src/feature/path git time --me -v --since=yesterday
git time -v --since="end of last month"
The -v gives you a nice table showing the time spend on each commit., (*1)
Works best as global composer package:, (*2)
composer global require sourcerer-mike/git-time # Do you have your composer bin accessible? If not ... echo 'PATH=$PATH:~/.config/composer/vendor/bin' >> ~/.bashrc
or local installation per project (composer require sourcerer-mike/git-time:dev-master).
You might like to add ~/.config/composer/vendor/bin/ to your PATH variable in Bash ;), (*3)
Check how long you took for that?, (*4)
git-time estimate src/my-feature/foo.php # or for a specific time range git-time estimate 13ea7dd..HEAD # or both git-time estimate 13ea7dd..HEAD src/my-feature/foo.php # for a particular time range (e.g. today) and a single author(maybe for you to clock at work) git-time estimate -v --since 00:00 --author "Mike Pretzlaw"
The result will be shown in a table:, (*5)
+---------+------------------+------------------------------------------+-------------+-------------+ | Hash | Date | Message | Duration | Cumulated | +---------+------------------+------------------------------------------+-------------+-------------+ | 18b978f | 2016-05-23 21:51 | initial empty commit | 1m | 1m | | feced85 | 2016-05-24 07:52 | Estimate taken time with max cap | 30m | 31m | | d2c50ce | 2016-05-24 08:20 | Fetch parent commits | 28m | 59m | | d21fd09 | 2016-05-24 08:38 | Calculate time related to parent commit. | 19m | 1h 18m | +---------+------------------+------------------------------------------+-------------+-------------+
Might be all. Did I miss something?, (*6)
Imagine you run git time -v on these commits:, (*7)
Initial commit second third fourth
| | | |
|--- 10 minutes ---|------ ~7 days ------|-- 3 minutes --|
| | | |
last week 12:00 12:10 today 10:20 10:23
| | | |
|--- 10 minutes ---|---- 30 minutes -----|-- 3 minutes --|
| | limited to maximum | |
Total of 43 minutes
The limit can be changed using git time --max=60 (minutes)
and there is even more about this:, (*8)
--no-parent-time and set it to hours if you take that long ;)git-time limits this down to 30 minutes.
If you don't like this limit then change it via the --max option.Providing the -v flag will give you a cleaner nicer look at this:, (*9)
+---------+------------------+----------------------+-------------+-------------+ | Hash | Date | Message | Duration | Cumulated | +---------+------------------+----------------------+-------------+-------------+ | 18b978f | yesterday 12:00 | initial empty commit | 1m | 1m | | feced85 | yesterday 12:10 | second | 10m | 11m | | d2c50ce | today 10:20 | third | 30m | 41m | | d21fd09 | today 10:23 | fourth | 3m | 44m | +---------+------------------+----------------------+-------------+-------------+