它计算每天、每周、每月或每年的提交。
git-count的Python项目详细描述
它提供了一个命令git-count,可以计算git存储库中的提交数。 在每一天,星期,月或年。
安装
它被上传到PyPI,因此您可以通过以下命令安装它:
# pip install git-count
您也可以从源代码安装它:
# python setup.py install
最新版本请访问git count的GitHub。
示例
统计由mosky创建的提交:
DESKTOP ~/mosql (dev) $ git count mosky 2013-06-03 20 2013-05-27 108 2013-05-20 117 2013-05-13 0 2013-05-06 3 2013-04-29 0 2013-04-22 37 2013-04-15 83
统计Mosky在3个月内创建的提交:
DESKTOP ~/mosql (dev) $ git count mosky -pm -n3 2013-06-01 23 2013-05-01 225 2013-04-01 153
计算5天内给定范围内的所有提交:
DESKTOP ~/mosql (dev) $ git count -r v0.5..dev -pd -n5 2013-06-06 0 2013-06-05 5 2013-06-04 11 2013-06-03 4 2013-06-02 0
用法
DESKTOP ~/mosql (dev) $ git-count --help usage: [-a | --author=<str>] [-p | --period=<str>] [-f | --first=<str>] [-n | --number=<int>] [-r | --range=<str>] [-t | --paths=<str>] [--no-all] [--merges] [--<key>=<value>...] or: count [-a | --author=<str>] [-p | --period=<str>] [-f | --first=<str>] [-n | --number=<int>] [-r | --range=<str>] [-t | --paths=<str>] [--no-all] [--merges] [--<key>=<value>...] It counts the commits in a Git repository. -a, --author=<str> Specify an author. -p, --period=<str> Specify the period: daily (d), weekly (w), monthly (m) or yearly (y). Default is weekly. -f, --first=<str> Specify the first day of weeks: monday (mon), sunday (sun), saturday (sat). Default is monday. -n, --number=<int> How many periods? -r, --range=<str> Specify the range, ex. master..dev. -t, --paths=<str> Specify the paths, ex. .gitignore. --not-all Count the commits in current branch only. --merges Include the merge commits. The other arguments will be passed to the command, ``git log``.