My current development environment uses git for VCS, and we use a feature branching workflow. I would like to get to a point where statistics can be generated about each feature. Mainly, I would like to be able to determine how long a feature took to complete, but other statistics would be nice to see as well, such as number of commits, lines of code, etc.
The main consideration is to avoid any superfluous work/process steps for the developers, but I wouldn't be against implementing something simple such as, "Feature branch must be created prior to work on a feature begins" in order to capture that timestamp.
I'm not sure the best way to go about gathering the required information. If a feature is merged into a mainline branch and deleted, I lose the history of when it was created.
The next solution I can see would involve a post-checkout
hook. Something like the following: https://gist.github.com/4557894 but there are a few flaws I can think of using this method.
Edit: As pointed out by @mr_ndrsn https://github.com/rietta/git_time_extractor. Ideas on how to make such a tool associate beyond commits/commit messages to branches?