简体   繁体   English

检查从远程分支在本地存储库上进行的git pull的历史记录

[英]Check history of the git pulls made on a local repository from a remote branch

Is there a way we can view the history of the pulls that were made on a local repository? 有没有办法可以查看在本地存储库中进行拉取的历史记录?

We use a shared system and wanted to have a log of the pulls that would have been made by different users. 我们使用共享系统,并希望记录不同用户可能产生的拉力。 I have searched for this on the net, but no significant luck. 我在网上搜索过这个,但没有明显的运气。 Does anyone have an idea about it? 有没有人对此有所了解?

To log the pulls made on a local repository: 要记录在本地存储库上进行的提取:

Every time you pull or merge a set of commits, git will make a merge commit. 每次提取或合并一组提交时,git都会进行合并提交。 Therefore, this will work: 因此,这将工作:

$ git log --merges

To find out which users have pulled from a Github repository: 要找出哪些用户已从Github存储库中提取:

$ # Wait a minute, this is impossible.

However, if you host the repository on one of your own servers, you can set up an http server with authentication, which you can then use to log the access, or With SSH access, you can configure SSHD to log which SSH key was used to access user 'git' (or whichever user your git repo is under) 但是,如果您在自己的某个服务器上托管存储库,则可以设置具有身份验证的http服务器,然后可以使用该服务器记录访问权限,或者通过SSH访问,您可以配置SSHD以记录使用的SSH密钥访问用户'git'(或您的git repo所属的用户)

Maybe you mean pull requests? 也许你的意思是拉请求?

If so, use the github API to retrieve a list of open and closed pull requests: http://developer.github.com/v3/pulls/ 如果是这样,请使用github API检索打开和关闭拉取请求的列表: http//developer.github.com/v3/pulls/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM