Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using github for excel files

Tags:

As a kind of follow up of this question, I would like to ask regarding binary files (such us excel files) and versioning.

Let's say I want to use github to store a programming project. No problem there since the majority of files are text (no matter the language).

But I have also documentation. What if I put it into a folder of the github project? (I have seen projects that do this)

I read git is no good for this, so how can I work versioning for say excel files?

like image 536
KansaiRobot Avatar asked Apr 20 '18 05:04

KansaiRobot


1 Answers

You could save your excel as .fods, which is regular .ods file saved as flat XML. This format is probably not supported by MS Office, so you may need to install Libre Office for this (it is free).

Since .fods is regular XML, it can be versioned as regular text file with diffs and (with some luck) even support of merges between branches.

You could also save other Open Document formats as flat XMLs:

  • .fodt for word processing (text) documents
  • .fods for spreadsheets
  • .fodp for presentations
  • .fodg for graphics

So if migration to Libre Office is not a problem, this is probably the best solution.


If this is not an option, you may consider using Git LFS for storing binaries. But if files are small and you don't change them often, you can just ignore the whole problem - few small binary files will not hurt your repository. You should just estimate - if you will start versioning 1 MB binary file and save 100 versions of it, this will increase size of your repository about 100 MB (it could be smaller if file can be compressed). You need a really large codebase to reach 100 MB in repository with text source files only, so in this case your repository will be filled mainly by binary files.

BTW: GitHub released a tool for measuring size of git repository: git-sizer. It may give you some hints about potential problems with your repository.

like image 107
rob006 Avatar answered Sep 28 '22 04:09

rob006