报告谁在我的 git 存储库上执行 pull/checkout/fetch

发布于 2024-10-18 13:35:28 字数 775 浏览 0 评论 0原文

我如何知道谁从我的 git 存储库中提取数据?或者做一个 git fetch origin ?显然我可以查看 git log 来查看推送/提交,但是有什么方法可以查看人们是否只是拉取我的代码来阅读它或保持同步?

这是一些背景信息。首先,我能找到的 stackoverflow 上最接近的匹配是 Track git Pushes and checkout 但是这个问题没有得到令人满意的解决。我决定将其纳入另一个问题,因为它略有不同......

环境是 git 存储库服务器,它充当开发人员克隆的中央存储库并将更改推回到其中。中央存储库是在持续集成中构建的存储库,并且发布是从该代码库完成的。

我有多种用户管理工具:gerrit、gitosis 和 gitolite。

我为什么想知道这一点以及为什么它也与您相关?就我而言,我想知道谁在做什么……谁在看什么。该信息可以帮助确定哪些项目不再维护/不再有趣并且可能被搁置。它还可以帮助创建丑陋的管理指标(实际上不是这个粉丝,但它是业务的必需品)谁是活跃的。 Git 日志将显示谁正在提交代码,这对于生产力来说更能说明问题,但如果人们不经常推送,则不会。我真的想不出任何其他用例,但这是我的两个。

那么...有什么方法可以直接从 git 中提取该信息吗?我记得 CVS 历史会给出一些内容,但我无法在 git 中弄清楚它。如果不直接使用 git,那么 gerrit、gitosis 或 gitolite 又如何呢?

谢谢。

How do I know who is pulling from my git repo? Or doing a git fetch origin? Obviously I can look at git log to see the pushes/commits, but is there any way to see if people are just pulling my code to read it or stay synched up?

Here is some context. First off, the closest match on stackoverflow I could find was Track git pushes and checkout but the question didn't satisfactorily get resolved. I decided to pull this into a different question because it is slightly different...

The environment is git repository server that is acting as a central repo that developers are cloning from and pushing changes back into. The central repo is the one that gets built in continuous integration and releases are done from that code base.

I have a variety of user management tools: gerrit, gitosis, and gitolite.

Why would I want to know this and why would it be relevant to you too? In my case I want to know who's working on what...who's looking at what. That info can help decide what projects are no longer maintained/interesting and can possibly be shelved. It can also help create ugly managerial metrics (not a fan of this really, but it is a necessity in the business) of who is active. Git log will show who's committing code, which is more telling on productivity, but not if people are not pushing frequently. I really cant think of any other use cases, but those are my two.

So...any way to pull that info from git directly? I remember CVS history would give some of that, but I cant figure it out in git. If not git directly, what about gerrit, gitosis, or gitolite?

Thanks.

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

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

发布评论

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

评论(1

仙气飘飘 2024-10-25 13:35:28

我想要解决此类任务的第一个工具集是尝试在 Apache 上使用 Git + WebDAV。通过身份验证和访问日志,可以为您提供所需的信息。如果失败了,您可能可以编写一个自定义的 Git 服务器。由于 Git 被设计为去中心化的,并且客户端无需与您选择的服务器通信即可进行操作,因此我相信跟踪检索的功能并不是核心的一部分。

The first toolset I would look to for solving such a task would be to try using Git + WebDAV on Apache. With authentication and access logs, that may provide you the information you're looking for. That failing, you may be in the position to write a custom Git server. As Git was designed to be decentralized, and clients can operate without ever talking to your chosen server, I believe the functionality for tracking retrievals isn't part of the core.

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