3

I've got some binary files (ODT files to be specific) in my Git repository and would like to find the commit that introduced a specific change. As the compare view of Eclipse doesn't help here (it shows the binary content), I would like to download and open each version in an external editor (Libre-/OpenOffice), one after another.

I could checkout each commit, but that will take much time and is sometimes not possible from within eclipse, for example because the project layout has changed in the meantime.

I know that I can use the command line, as described here:

But is there any option to export a binary file from a commit from within eclipse?

In other words: What is the equivalent to git cat-file -p REVISION:PATH_TOFILE in EGit?

Tobias Liefke
  • 8,637
  • 2
  • 41
  • 58
  • As a side note, may we ask why you are versioning binary files using Git? – Tim Biegeleisen Jul 18 '17 at 09:57
  • Because I can :-) And because it belongs to the source code of my project (it contains a template for document generation). And yes I know that Git is not the best tool for handling the history of binary files, but I think that the disadvantages of using two different kind of repositories here will outnumber the advantages. – Tobias Liefke Jul 18 '17 at 10:55
  • I just found out that we can switch to "FODT", which improves merges and diffs _in the future_. But I still have the ODTs _from the past_ in the history (and sometimes there are other binary files) - I mean this not an answer to my question. – Tobias Liefke Jul 18 '17 at 11:45
  • Why do you want the binary file in Eclipse? – Tim Biegeleisen Jul 18 '17 at 11:46
  • If I want to look into an earlier version of a (textual) source code file, I can just open that file from the history - and I hope there is something easy like this for binary files as well. – Tobias Liefke Jul 18 '17 at 13:01
  • 1
    I upvoted your question. While I don't see the point of looking at a raw binary file, it certainly would be useful to see an earlier version of e.g. an image binary file. – Tim Biegeleisen Jul 18 '17 at 13:29

0 Answers0