在远程服务器上显示提交范围的git日志? [英] Show git logs for range of commits on remote server?

查看:117
本文介绍了在远程服务器上显示提交范围的git日志?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找一种方法来查询git服务器的日志,查看给定的提交范围。作为一名SVN用户,我的思维错误,希望GIT专家能够提供帮助。我正在寻找类似于:

  svn log -r 5:20 --xml svn.myserver.com 

但是用于git服务器。换句话说,显示第5次提交到第20次提交的日志。感谢您的帮助。

解决方案

首先,由于Git没有简单的修订版本号,您可以指定修订版 rev-parse命令

但是直接查询远程仓库(不克隆或获取数据)的唯一命令是 git ls-remote


  • 它只会显示SHA1,而不会显示日志消息。

  • 它适用于ref模式(头部,标签,分支,...),而不是转换。


由于log可以显示diffstats和full diffs,所以如果没有至少在本地仓库中获取远程镜像,就不能要求日志。


I am looking for a way to query a git server for its logs for a given range of commits. Being an SVN user, I'm in the wrong mindset so Im hoping GIT experts can help. I'm looking to something similar to:

svn log -r 5:20 --xml svn.myserver.com

but for a git server. In other words, show me the logs for the 5th commit through to the 20th commit. thanks for any help.

解决方案

First, since there is no simple revision number with Git, you would specify revision as mentioned in the rev-parse command.

But the only command which queries directly a remote repo (without cloning or fetching data) is git ls-remote, and:

  • it will display only SHA1, not the log message.
  • it works on ref patterns (head, tags, branches, ...), not with revs.

Since log can show diffstats and full diffs, you cannot ask for logs without at least fetching a remote in a local repo.

这篇关于在远程服务器上显示提交范围的git日志?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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