我如何远程获取两个 git hash 之间的更改列表

发布于 2024-10-30 20:33:35 字数 286 浏览 0 评论 0原文

我有两个 git hash,我想获取它们之间所有更改的日志,但这发生在服务器上,我需要一种不制作本地副本的方法,否则会涉及一个非常复杂的过程。

当我使用 svn 来执行此操作时,只需使用 svn 命令行,我就可以使用用户名查询两个版本之间的差异,这是完美的。

svn --username="bla" --password="bla" log http://svnrepository -r100:102

git 存储库不能远程充当我的服务器,以便我可以远程执行此操作吗?

I have two git hash i would like to get the log of all changes between them but this is happening on server I need a way to not make a local copy or it would involve a pretty involved procedure.

It was perfect when I use to do it with svn just having svn command line i could query it with a username for difference between two builds.

svn --username="bla" --password="bla" log http://svnrepository -r100:102

Can't a git repository remotely act like a server to me so I can execute this remotely?

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

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

发布评论

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

评论(2

冰葑 2024-11-06 20:33:36

我认为这是不可能的。与本地执行相比,在远程版本上运行的 diff 会非常慢,而 git 会尝试在本地执行操作。您能做的最好的事情就是克隆存储库,然后在两个远程分支之间进行比较。

OTOH,您也许可以使用某种 git Web 界面来在线查看差异。

I don't think this is possible. A diff running on remote versions would be incredibly slow compared to doing it locally and git tries to do things locally. The best you can do is to clone the repository and then diff between the two remote branches.

OTOH, you might be able to use some kind of git web interface to see diffs online.

萌面超妹 2024-11-06 20:33:36

如果您的存储库确实如此巨大,以至于这比仅克隆存储库要好,我认为您可以使用使用 git archive 及其 --remote 选项。您可以轻松地沿着这些线路更改此脚本以获取远程存储库参数。

If your repository is really so huge that this would be a win over just cloning the repository, I think you can do this with a script that uses git archive with its --remote option. You can easily alter this script along those lines to take a remote repository parameter.

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