Skip to content
This repository has been archived by the owner on Jun 15, 2021. It is now read-only.
/ git-hours Public archive

This is just a small docker image which was built using alpine for using git-hours npm module

License

Notifications You must be signed in to change notification settings

zaherg/git-hours

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Docker Pulls

Git-Hours

I created this docker image because I didnt like the size of the original docker image which is based on ubuntu 755MB, This image is only 168MB.

PS: Am going to copy the commands from the original repository git-hours.

Usage

In root of a git repository run:

$ git hours

Note: repository is not detected if you are not in the root of repository!

Help

    Usage: git hours [options]

    Options:

      -h, --help                                 output usage information
      -V, --version                              output the version number
      -d, --max-commit-diff [max-commit-diff]    maximum difference in minutes between commits counted to one session. Default: 120
      -a, --first-commit-add [first-commit-add]  how many minutes first commit of session should add to total. Default: 120
      -s, --since [since-certain-date]           Analyze data since certain date. [always|yesterday|tonight|lastweek|yyyy-mm-dd] Default: always'
      -e, --email [emailOther=emailMain]         Group person by email address. Default: none
      -u, --until [until-certain-date]           Analyze data until certain date. [always|yesterday|today|lastweek|thisweek|yyyy-mm-dd] Default: always
      -m, --merge-request [false|true]           Include merge requests into calculation.  Default: true
      -p, --path [git-repo]                      Git repository to analyze. Default: .
      -b, --branch [branch-name]                 Analyze only data on the specified branch. Default: all branches

    Examples:

     - Estimate hours of project

         $ git hours

     - Estimate hours in repository where developers commit more seldom: they might have 4h(240min) pause between commits

         $ git hours --max-commit-diff 240

     - Estimate hours in repository where developer works 5 hours before first commit in day

         $ git hours --first-commit-add 300

     - Estimate hours work in repository since yesterday

       $ git hours --since yesterday

     - Estimate hours work in repository since 2015-01-31

       $ git hours --since 2015-01-31
       
    - Estimate hours work in repository on the "master" branch

       $ git hours --branch master

    For more details, visit https://github.com/kimmobrunfeldt/git-hours

Run with docker

Install docker and run the following command inside the git repo you want to analyze:

docker run --rm -v $(pwd):/code zaherg/git-hours

It mounts the current directory (pwd) inside the docker container and runs git hours on it.

Credits

  1. This image is based on official node images.
  2. git-hours was built by Kimmo Brunfeldt.

About

This is just a small docker image which was built using alpine for using git-hours npm module

Topics

Resources

License

Stars

Watchers

Forks