【问题标题】:Is it possible to check, if a git tag is reachable from another git tag in same repo using remote commands?是否可以检查是否可以使用远程命令从同一仓库中的另一个 git 标签访问 git 标签?
【发布时间】:2017-10-11 13:05:30
【问题描述】:

是否可以通过远程 git 命令检查是否可以从 repo 中的另一个 git tag/commit 访问 git tag/commit,即无需克隆代码。

我可以使用 git rev-list 或 git merge-base 在本地完成。 我尝试使用 git ls-remote,但无法这样做。

【问题讨论】:

  • 没有。您必须在本地拥有存储库才能在历史记录中找到您想要的内容。
  • @ckruczek,你能写一个答案吗?
  • @Chococroc 谢谢你的提醒。我添加了一个答案。

标签: git git-remote git-tag git-rev-list ls-remote


【解决方案1】:

为了与 git 存储库交互,您必须克隆它。

使用 git clone <remote> 在本地获取存储库,之后您可以使用之前已经使用过的命令进行过滤。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-05-25
    • 2011-11-01
    • 2019-01-22
    • 2011-09-03
    相关资源
    最近更新 更多