gpt4 book ai didi

git - 获取两个存储库之间的差异

转载 作者:IT王子 更新时间:2023-10-29 01:18:17 26 4
gpt4 key购买 nike

我们如何获得两个 git 存储库之间的差异?

场景:我们有一个 repo_a 和 repo_b。后者是作为 repo_a 的副本创建的。之后两个存储库都进行了并行开发。有没有办法列出这两个存储库当前版本的差异?

最佳答案

在 repo_a 中:

git remote add -f b path/to/repo_b.git
git remote update
git diff master remotes/b/master
git remote rm b

关于git - 获取两个存储库之间的差异,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1968512/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com