Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Show pdf differences on GitHub

Tags:

git

github

pdf

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).

like image 864
Darkry Avatar asked Jun 10 '12 17:06

Darkry


People also ask

Can Git track PDF changes?

Track changes in Excel, Word, PowerPoint, PDFs, Images & Videos with Git. Git is an open-source, distributed version control system.

Can GitHub show PDF?

GitHub supports rendering of PDF documents.

Does Diff work on PDF?

Ad. DiffPDF is a small but useful tool that compares two PDF files and let you know the differences. This easy to use tool is free for Linux. If you often read books then you can compare for changes in the paragraph and other deep aspects.


1 Answers

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.

like image 116
derekerdmann Avatar answered Sep 26 '22 06:09

derekerdmann