How can I get some sort of statistics of my Git repository?
I am currently hosting the Git repository in BitBucket and wanted to find the following details:
- Total number of commits
- Used Programming Languages
- Lines of code in total for each Programming Language
Do you think this is achievable? Or am I asking for too much. There maybe a clever tool that I am not aware of.
Also using SourceTree to push and pull code, if that helps.
Thank you in advance.
Number of commits
I would recommend one of these two
git rev-list --count origin/masterfor just the master branchgit rev-list --all --countfor all branchesAs somebody mentioned,
git log --oneline | wc -lwill give you number of commits, except that's only for the current branch. To usegit log --oneline, you will need to do it for all branches to get the total number of commits for all branches. You can't iterate because many commits will be counted multiple times so you must take all heads (or perhaps refs) and generate a single expression to do a log from all of them.Languages and lines of code
Use the cloc tool to get all that.