在GitHub上显示PDF差异 [英] Show pdf differences on GitHub

查看:651
本文介绍了在GitHub上显示PDF差异的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有两种版本的pdf(或doc,odf)文件可以显示差异(提交信息)吗?现在我只能下载它的任何版本(view raw按钮)。 解决方案

PDF,DOC和ODF文件是二进制格式,并且不包含纯文本。 Git并没有真正支持二进制文件的人类可读的差异 - 它可以生成二进制差异,但没有额外的处理就没有多大意义。



有关处理二进制差异的更多信息,请参阅此答案: https://stackoverflow.com/a/4705537/247763



据我所知,GitHub可以显示差异的唯一二进制格式是图像。图像差异是GitHub的自定义部分,用于比较存储库中两个不同的图像版本,但这是不是原生Git功能。



如果您需要查看二进制文件的两个版本之间的差异,请参阅标准编辑器已有的功能。最新版本的Microsoft Word可以显示两个DOCX文件之间的差异,但这只能在您的机器上执行 - 而不是在GitHub上。


Is there any way to show differences (on commits info) between two versions of pdf (or doc, odf) file? Now I can only download any version on it ("view raw" button).

解决方案

PDF, DOC, and ODF files are binary formats, and don't contain plain text. Git doesn't really support human-readable diffs for binary files - it can generate binary diffs, but it won't make much sense without additional processing.

See this answer for more info handling binary diffs: https://stackoverflow.com/a/4705537/247763

As far as I know, the only binary format that GitHub can display diffs for is images. Image diffs are custom parts of GitHub that were written to compare the two different image versions in the repository, but this is not a native Git feature.

If you need to see the differences between two versions of a binary file, see what functionality the standard editor already has. Recent versions of Microsoft Word can display differences between two DOCX files, but that has to be performed on your machine only - not on GitHub.

这篇关于在GitHub上显示PDF差异的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆