【问题标题】:How do I compare repos from different projects through github? [duplicate]如何通过 github 比较来自不同项目的 repos? [复制]
【发布时间】:2014-09-07 08:56:03
【问题描述】:

这里是 Git 新手,我如何使用 github 比较两个完全独立的存储库(它们之间没有分叉/分支)?如果这不可能,我如何比较两个 repos?

【问题讨论】:

    标签: github repository


    【解决方案1】:

    在 GitHub 上,无法比较两个不相关的存储库。

    在您的计算机上,您可以:

    1. 转到本地仓库的工作目录
    2. 为另一个 repo 添加一个远程并获取它
    3. 比较使用git diff

    例如:

    cd /path/to/repo
    git remote add other URL_TO_OTHER
    git fetch other
    git diff other/branchname
    git diff ..other/branchname  # diff in the other direction
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2023-01-25
      • 2019-06-06
      • 1970-01-01
      • 2020-11-02
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2010-10-14
      相关资源
      最近更新 更多