作者:前前后后zzyyix | 来源:互联网 | 2023-05-26 15:05
1> jub0bs..:
我怎么能这样做而不是origin
使用path/to/github/repo.git
?
git diff https://github.com/malarres/universal.git/GPII-795..HEAD
这不是可行的方式git diff
.如果要在本地仓库和另一个仓库之间进行区分,则需要执行以下操作:
将后者添加为前者的远程.请注意,除了origin
在一个存储库中之外,没有什么可以阻止您定义多个遥控器.(但是,您可能希望选择比"其他"更不通用的远程名称.)
git remote add other https://github.com/malarres/universal.git/GPII-795
从该远程获取所有内容:
git fetch other
git diff
例如,运行适当的命令
git diff other/master..HEAD
如果您以后想要从存储库中删除该远程,则可以运行
git remote rm other