On Tue, 6 Nov 2012 20:40:38 -0800 (PST)
"seonguk.baek" <baekseon...@gmail.com> wrote:

> Is there any way how to get the counts of the commit for each branch
> per week?

I don't think there's a built-in way to do that (since this is for
managers and Git is for developers) but I think you could script that
yourself: start with `git for-each-ref` passing it 'refs/heads/*' to
enumerate branches only, then parse each line output (you can customize
their format by passing appropriate options to `git for-each-ref`) then
run `git log` for that branch, passing it appropriately constructed
"--format" option to produce a machine-parsable commit date.
The rest is to analyze those dates.

Note that history in Git is non-linear: a branch is just a
convenient name of a tip commit of some series of commits, and this
series might have merges and so on; you have to devise a strategy to
handle traversing of lines of histories merge commits unite.


Reply via email to