2

Why does Git keep track of changes in text files and markdown files and LaTeX files but not Word files or Google Documents?

I want to figure out how to simplify using Git for collaborative writing with people who don't use, need, or want something as robust as Git.

Bryon Gloden
  • 316
  • 1
  • 12
  • 3
    Because computing differences on binary files is a complex task. – arrowd Aug 06 '17 at 15:01
  • I was kind of thinking the same thing. – Bryon Gloden Aug 06 '17 at 15:02
  • 6
    Git absolutely will track these files. Are you asking why you can't get a nice diff of your changes? It's because Git cannot possibly understand every proprietary file format in existence, and showing you a diff of the binary data would hardly be useful. – user229044 Aug 06 '17 at 15:07
  • 1
    One note... git does not store "changes" at all, for any file. It stores a snapshot of the entire file and keeps that in the relevant revision (commit). The diff is only calculated at the point you ask for it. But even plain text files are stored in git as full file content snapshots, same as LaTeX, DOC, XLS, JPEG, GIF... everything. – Dan Lowe Aug 06 '17 at 15:12
  • 1
    Also Google Documents is a cloud-hosted platform, there are no "files" for Git to track. Git cannot version-control data stored on Google's servers. – user229044 Aug 06 '17 at 15:14
  • `.docx` or `.odt` documents are **executable files**, and Git isn't appropriate to make file versionning of that kind of files. – Canuto-C Aug 07 '17 at 08:41

0 Answers0