How many people were involved in the project? Based on version control system

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?

+5
source share
7 answers

git

The team is shortlogvery helpful. This summarizes a typical conclusion 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:

$ git shortlog -sn | wc -l
      40
+17
source

mercurial , : hg churn.

hg churn , , hg churn -c.

+9

svn log -q svn://path/to/repo | cut -f 3 -d " "  | sort -u
+4

, Mercurial, . , * nix, , Mercurial:

hg log | grep user: | cut -c 14- | sort -u | uniq | wc -l

, , git, sort -u uniq!

+1

git:

git log --pretty=tformat:%an | sort -u | wc -l

:

git log --pretty=tformat:%ae | sort -u | wc -l
+1

Mercurial (. hg help templates). , , :

hg log --template '{author}\n' | sort -u

( ), author:

hg log --template '{author|person}\n' | sort -u

wc -l .

+1

All Articles