How do you know how many developers were involved in a project using a Revision Control System? A friend of mine found this way to look up the answer in git log:
git log | grep Author: | sort -u | cut –delimiter=” ” -f2 | sort -u | wc -l
Is there a straightforward way in git? How about other Revision Control System like Subversion, Bazaar or Mercurial?
There are two types of version control: centralized and distributed.
The types of VCS are: Local Version Control System. Centralized Version Control System. Distributed Version Control System.
Some popular version control systems are Git (distributed), Mercurial (distributed), and Subversion (centralized). In centralized version control, each user gets his or her own working copy, but there is just one central repository.
Version control is important to keep track of changes — and keep every team member working on the right version. You should use version control software for all code, files, and assets that multiple team members will collaborate on.
The shortlog
command is very useful. This summarizes the typical git-log
output.
$ git shortlog -sn
119 tsaleh
113 Joe Ferris
70 Ryan McGeary
45 Tammer Saleh
45 Dan Croak
19 Matt Jankowski
...
Pass to wc
to see the number of unique usernames:
$ git shortlog -sn | wc -l
40
For mercurial, there's an extension to do exactly that: hg churn
.
hg churn
sorts by line-changed, if you want changeset count, use hg churn -c
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With