How do you know how many developers were involved in a project using a version control system? My friend found this way to find the answer in git log:
git log | grep Author: | sort -u | cut –delimiter=" " -f2 | sort -u | wc -l
Is there an easy way in git? What about another version control system like Subversion, Bazaar or Mercurial?
The team is shortlogvery helpful. This summarizes a typical conclusion git-log.
shortlog
git-log
$ git shortlog -sn 119 tsaleh 113 Joe Ferris 70 Ryan McGeary 45 Tammer Saleh 45 Dan Croak 19 Matt Jankowski ...
Go to wcto see the number of unique usernames:
wc
$ git shortlog -sn | wc -l 40
mercurial , : hg churn.
hg churn
hg churn , , hg churn -c.
hg churn -c
svn log -q svn://path/to/repo | cut -f 3 -d " " | sort -u
Bazaar, :
https://launchpad.net/bzr-stats/
, Mercurial, . , * nix, , Mercurial:
hg log | grep user: | cut -c 14- | sort -u | uniq | wc -l
, , git, sort -u uniq!
sort -u
git:
git log --pretty=tformat:%an | sort -u | wc -l
:
git log --pretty=tformat:%ae | sort -u | wc -l
Mercurial (. hg help templates). , , :
hg help templates
hg log --template '{author}\n' | sort -u
( ), author:
author
hg log --template '{author|person}\n' | sort -u
wc -l .
wc -l