可视化 git 存储库的进度

发布于 2024-10-06 09:15:33 字数 1539 浏览 0 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

预谋 2024-10-13 09:15:33

我知道 github 和其他主机已经展示了这一点。但自动化这样的事情并不难:

git log --no-merges --author="Jane" --format="%ai" --all

这将显示 Jane 所有提交的日期。您可以使用 > 将其流式传输到文件中最后导出.csv。然后您可以使用 Excel 打开它,您可以在其中操作数据。或者您可以导出每个作者及其提交:

git log --no-merges --all --format=" %an %ai"

此外,您可以挖掘有关每个提交的更多信息(例如每次更改的行数或受影响的路径等......)

for sha1 in $(git log --no-merges --format="%H" master@{"1 month ago"}..master); do
    git log -1 --format=" --- %an %ai ---" $sha1 >> tempfile
    git log --stat -1 $sha1 >> tempfile
    # some other processing
done

这次我将输出限制为 master是上个月。

I know that github and other hosts show this already. But it wouldn't be hard to automate something like that:

git log --no-merges --author="Jane" --format="%ai" --all

This will show the dates of all the commits of Jane. You can stream that to a file with > export.csv at the end. You then open this with excel where you can manipulate the data. Or you can export each author and their commits:

git log --no-merges --all --format=" %an %ai"

further, you could dig out more info about each commit (say the number of lines changed each time, or paths affected, etc..)

for sha1 in $(git log --no-merges --format="%H" master@{"1 month ago"}..master); do
    git log -1 --format=" --- %an %ai ---" $sha1 >> tempfile
    git log --stat -1 $sha1 >> tempfile
    # some other processing
done

This time I've limited the output to where master was last month.

妳是的陽光 2024-10-13 09:15:33

看一下 gitstats,它使用 GNU Plot 来可视化存储库的活动历史记录:

http://gitstats.sourceforge.net

Have a look at gitstats, which uses GNU Plot to visualize a repo's history of activity:

http://gitstats.sourceforge.net

笔芯 2024-10-13 09:15:33

您可以使用 git Shortlog --since="1 个月前"。或者,您可以使用 git log--format 选项以适合您想要的绘图方式的格式输出信息。

You can use git shortlog --since="1 month ago". Or you can use the --format option to git log to output information in a format suitable for how you want to plot things.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文