Github /比较:如何区分两个不同的文件(不同的文件名,都在HEAD中)? [英] Github/compare: How to diff two different files (different file names, both in HEAD)?
问题描述
我可以使用github / compare比较
来显示HEAD中两个不同源文件之间的差异吗?
下面是我在命令行中如何使用 git diff
:
$ b
git diff HEAD:docs / tutorial / 01-boxed-function-pointers.cpp HEAD:docs / tutorial / 02-raw-actors.cpp
我对github语法的最佳猜测如下。但它不起作用:
我特别想要一个在线漂亮的HTML呈现的差异。
如果用github不能完成这项工作,任何人都可以推荐一个第三方网站,它可以呈现两个任意文件在github上的差异吗?
编辑#1:
感谢那些推荐 https://www.diffchecker.com 。但是,我需要能够将源文件指定为github上的当前HEAD。任何第三方工具都需要自动从github repo网址中提取最新的源文件。我注意到 http://www.mergely.com 可以从URL导入源文件。然而,我正在寻找一个总是使用最新HEAD的实时视图。
谢谢。
我一直在使用这个第三方在线比较工具很长一段时间,如果你喜欢,你也可以使用它。 https://www.diffchecker.com 。但似乎你应该手动将两个文件粘贴到它上面。
Can I use the github /compare
to display the difference between two different source files in HEAD?
Here is how I do it on the command line with git diff
:
git diff HEAD:docs/tutorial/01-boxed-function-pointers.cpp HEAD:docs/tutorial/02-raw-actors.cpp
My best guess at the github syntax is the following. But it doesn't work:
I specifically want an on-line pretty-printed HTML render of the diff.
If this can't be done with github, can anyone recommend a third-party website that will render diffs of two arbitrary files hosted on github?
Edit #1:
Thanks to the answers who recommended https://www.diffchecker.com. However, I need to be able to specify the source files as current HEAD on github. Any third-party tool would need to automatically pull the latest source files from github repo URLs. I notice that http://www.mergely.com can import source from URLs. However I am looking for a live view that always uses the latest HEAD.
Thank you.
I have been using this third party online diff tool for a long time, if you like, you can use it as well. https://www.diffchecker.com. But it seems you should manually paste the two files onto it.
这篇关于Github /比较:如何区分两个不同的文件(不同的文件名,都在HEAD中)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!