比较2个不同的github repos中的2个文件

时间:2017-06-14 08:30:33

标签: github diff

有没有办法比较2个不同的github repos中的2个文件与不同的文件夹名称?

github repo 1
a/
   1.txt

github repo 2
b/
   1.txt

正在研究使用git diff,但似乎不可能

1 个答案:

答案 0 :(得分:0)

尝试使用git diff命令

git diff --no-index repo1/a repo2/b

git diff --no-index [--options] [--] [<path>…​]
This form is to compare the given two paths on the filesystem. 
You can omit the --no-index option when running the command in a working
tree controlled by Git and at least one of the paths points outside 
the working tree, or when running the command outside a working tree 
controlled by Git.