如何在远程存储库上“混淆”? [英] How to 'git blame' on the remote-side repository?

查看:146
本文介绍了如何在远程存储库上“混淆”?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的服务器上,我托管了我的个人git远程端项目(使用gitosis),并且我构建了一个web界面来浏览存储库(类似Github)。



<在远程端,你不能做很多事情,因为缺少一个工作树,这是正确的:btw,对于一个版本库浏览器,几乎没有任何命令我几乎可以做任何事情。



git blame 外。



我无法找出如何指责一个没有工作树的文件,位于远程端存储库中。你有一些想法吗?

解决方案

以下应该可以在裸仓库中使用:

  git blame< rev> - <路径> 

例如

  git blame master  -  README.txt 


on my server I host my personal git remote-side projects (with gitosis), and I have built a web interface to browse the repositories (something like Github).

On the remote-side, you are not allowed to do a lot of stuff, because a working tree is missing, and this is correct: btw, for a repository explorer, with few commands I can do almost everything.

Except for git blame.

I'm not able to find out how to blame a file without a working tree, within the remote-side repository. Got you some ideas?

解决方案

The following should work even in bare repositories:

git blame <rev> -- <path>

E.g.

git blame master -- README.txt

这篇关于如何在远程存储库上“混淆”?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆