简体   繁体   English

没有克隆存储库的Git日志?

[英]Git log without cloning the repository?

git log give us a really good functionality to know about what happened in the project. git log给我们提供了一个非常好的功能来了解项目中发生的事情。 When we are in our machine and we have the cloned project is just executing the command. 当我们在我们的机器中时,我们克隆的项目只是执行命令。 But I've realized that sometimes I need to read the log from somewhere else that is not my machine, so it would be great to ask for a log without having the repository cloned. 但我意识到有时候我需要从不是我的机器的其他地方读取日志,所以在没有克隆存储库的情况下请求日志会很棒。

I've been looking around through google an reading the git-log man page but I didn't found a way to do it. 我一直在浏览谷歌阅读git-log手册页,但我没有找到办法做到这一点。

Does anybody know if this way of log can be done? 有人知道这种日志方式是否可以完成?

Thanks in advance. 提前致谢。

I don't know if a built-in way for this exists, but you can always fall back to a remote command over ssh: 我不知道是否存在这种内置方式,但您总是可以通过ssh回退到远程命令:

ssh some-host "cd my/repo && git log"

This of course only works if you have shell access to the host. 这当然只有在您拥有对主机的shell访问权限时才有效。

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

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