add num_commits to GitRepo. This field is the number of unique commits across all branches.
Known defect: it runs slower than before due to a bunch of save(). Will fix.