Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

can git be used for version control on non text documents such as word doc or xls etc

Tags:

I've been learning about the GIT version control system recently and It seems to work very well for plain text documents as you can add a single line, go back and fork it, revise the document and remove the line you just added.

I program mostly in excel and write documentation in word. Can GIT be used to manage versions of these files (obviously not the stuff inside the files, but the files themselves?)

like image 213
yoshiserry Avatar asked Jun 03 '14 06:06

yoshiserry


People also ask

Can Git version control word documents?

Most of the solutions currently available are partial, at the moment, because git can't understand Excel or word files and just treats them as black-box “binary” files.

Can Git be used for documentation?

Because the files are stored in Git as plain text, it is easy to include documentation changes in your merge requests. The web interface of your Git repository will automatically convert the Markdown format to a nicely formatted page for everyone to read.

Can Git be used for version control?

Git is an open source distributed version control system that helps software teams create projects of all sizes with efficiency, speed, and asynchronicity.

Is there version control in word?

Version control is accessible through Microsoft Office (Word, Excel, PowerPoint) or the Office 365 Portal. From the open file, click on the File tab: You will see the current version at the top and previous versions thereafter.


1 Answers

Git is agnostic in the sense that it doesn't matter which files you put under version control.

When git can't recognise the type of a file it just treats it as binary data for versioning purposes; so diff etc. will just state that the files are different by a number of bytes.

So to answer your question: Yes, Git can be used to manage versions of word documents etc., furthermore using gitattributes you can even diff word documents although I'm not sure if this is possible for xls files.

To learn more about the possibilities which gitattributes provide and to see some examples for diffing word files you can read the Customizing Git - Git Attributes chapter from the Gitpro book.

like image 72
Sascha Wolf Avatar answered Oct 21 '22 03:10

Sascha Wolf