git提交频率的punchcard生成器

git-punchcard的Python项目详细描述


简单的git punchcard实用程序,灵感来自git-punchcard-plot,但已重写 对于带有matplotlib的python3。

Screenshot

安装

PyPI安装或升级,如下所示:

pip install --user --upgrade git-punchcard

另外,确保$HOME/.local/bin位于$PATH中。

为了避免与其他软件包冲突,我建议安装到 隔离环境,例如使用pipx

pipx install git-punchcard

用法

基本用法:

git punchcard

其他参数可以指定如下:

git punchcard [<input path>...][<options>][--][<log options>][<revision range>][-- <path>...]

有关可用选项的更多帮助,请键入:

git punchcard -h            # [options]
git help log                # [log options]
git help gitrevisions       # [revision]

选项

最常见的内置选项是:

# use a fixed timezone for all commits:
git punchcard --timezone CET
git punchcard --timezone Europe/Berlin
git punchcard --timezone UTC+02:30

# show punchcard with specified y/x axes:
git punchcard -p year/month
git punchcard -p wday/month

# histogram with specified x axis:
git punchcard -p /wday

# set the directory of the git repository (multiple allowed):
git punchcard /path/to/repo

# analyze all repositories in ~/dev:
git punchcard ~/dev/*/.git

# read commit dates from stdin:
git punchcard -

# show a github-like punchcard plot with grid:
git punchcard --grid

默认情况下,每个提交的本地时区用于绘图。如果设置 固定时区,应根据时区名称指定(例如 CETEurope/Berlin,但也可以通过iso 3166国家代码给出 或国家名称(如果时区不明确,我们将选择第一个条目)。

Git日志选项

此外,您可以将git log理解的任何选项传递给例如。 限制提交的范围并限制由某个 作者:

# include only commits by specific author:
git punchcard --author=myself

# consider only only the 20 commits:
git punchcard master~20..master

# commits within a certain time frame:
git punchcard --since="1 year ago" --until=now

# show at which times a certain file/folder is usually edited:
git punchcard --follow -- README.rst docs

# show at which times, people like to merge:
git punchcard --merges

高级示例

跟踪多年来提交活动的演变:

for year in {2016..2019};do
    git punchcard -o $year.png --title $year\
        --since 1.1.$year --until 31.12.$yeardone

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java使用servlet的正确方法是什么?   java Android ListView选中所有复选框(自定义ResourceCursorAdapter)   java如何在一个活动中正确处理多个片段交互侦听器?   java jUnit和忽略继承的测试   具有多个权限的java ActivityResultLauncher   Java:我可以通过应用程序将客户端重定向到loadbalancer后面的同一个会话/节点吗?   java如何使用Hibernate保存具有一对一关系的两个类?   java JEditorPane字体大小设置不准确   java为什么JUnit4导入不被识别,即使JUnit4在我的有效pom中。xml?   多次使用流后的java空映射   JavaSwing中AccessibleContext的用途是什么?   java指定使用T的类   java查找twitter4j转发速率限制   枚举的Java数组(类)   java通过Maven build排除了一些类