Is there a git activity log?

和自甴很熟 提交于 2019-12-04 08:32:49

That is why we have installed gitolite V3 (by simply cloning its repo and installing it like in this installation script) on our central git repo server.

Gitolite will intercept any git commands, and (in addition of its primary authorization framework feature) will record said commands in ~/.gitolite/logs/gitolite-log-xxx.

Here is an extract of such logs:

2012-08-16.12:20:19     29507           system,/home/gitadmin/gitolite/bin/triggers/post-compile/update-git-configs,POST_COMPILE
2012-08-16.12:20:19     29507           system,/home/gitadmin/gitolite/bin/triggers/post-compile/update-gitweb-access-list,POST_COMPILE
2012-08-16.12:20:19     29507           system,/home/gitadmin/gitolite/bin/commands/access,%,gitweb,R,any
2012-08-16.12:20:19     29507           system,/home/gitadmin/gitolite/bin/commands/git-config,-r,%,gitweb\.
2012-08-16.12:20:19     29507           system,/home/gitadmin/gitolite/bin/triggers/post-compile/update-git-daemon-access-list,POST_COMPILE
2012-08-16.12:20:20     29507           system,/home/gitadmin/gitolite/bin/commands/access,%,daemon,R,any
2012-08-16.12:20:20     29507   END
2012-08-20.07:39:12     17683   ssh     ARGV=gitoliteadm        SOC=git-upload-pack 'gitolite-admin'    FROM=127.0.0.1
2012-08-20.07:39:12     17683           access(gitolite-admin, gitoliteadm, R, 'any'),-> refs/.*
2012-08-20.07:39:12     17683           trigger,Writable,access_1,ACCESS_1,gitolite-admin,gitoliteadm,R,any,refs/.*
2012-08-20.07:39:12     17683   pre_git gitolite-admin  gitoliteadm     R       any     -> refs/.*
2012-08-20.07:39:12     17683           system,git,shell,-c,git-upload-pack '/home/gitadmin/repositories/gitolite-admin.git'
2012-08-20.07:39:12     17683   END
2012-08-16.12:20:19     29507           system,/home/gitadmin/gitolite/bin/triggers/post-compile/update-git-configs,POST_COMPILE
2012-08-16.12:20:19     29507           system,/home/gitadmin/gitolite/bin/triggers/post-compile/update-gitweb-access-list,POST_COMPILE
2012-08-16.12:20:19     29507           system,/home/gitadmin/gitolite/bin/commands/access,%,gitweb,R,any
2012-08-16.12:20:19     29507           system,/home/gitadmin/gitolite/bin/commands/git-config,-r,%,gitweb\.
2012-08-16.12:20:19     29507           system,/home/gitadmin/gitolite/bin/triggers/post-compile/update-git-daemon-access-list,POST_COMPILE
2012-08-16.12:20:20     29507           system,/home/gitadmin/gitolite/bin/commands/access,%,daemon,R,any
2012-08-16.12:20:20     29507   END
2012-08-20.07:39:12     17683   ssh     ARGV=gitoliteadm        SOC=git-upload-pack 'gitolite-admin'    FROM=127.0.0.1
2012-08-20.07:39:12     17683           access(gitolite-admin, gitoliteadm, R, 'any'),-> refs/.*
2012-08-20.07:39:12     17683           trigger,Writable,access_1,ACCESS_1,gitolite-admin,gitoliteadm,R,any,refs/.*
2012-08-20.07:39:12     17683   pre_git gitolite-admin  gitoliteadm     R       any     -> refs/.*
2012-08-20.07:39:12     17683           system,git,shell,-c,git-upload-pack '/home/gitadmin/repositories/gitolite-admin.git'
2012-08-20.07:39:12     17683   END

you can use reflog to see how the references were moving, that registers activity sometimes not visible from usual git log (like fast-forward merges) but i don't think it should matter in your case.

I believe you have structure like that (it is by the way recommended to put .git extension to bare repo name, so it is easy to distinguish): ../core.bare.git/ containing branches, config, HEAD, hooks, info, objects, etc ../core.bare.git/.git containing its own set of branches, config etc I think you repo on the server is totally fine, you just have to remove the .git folder from it and double check that the config file is still saying it is a bare repo.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!