How to perform better document version control on Excel files and SQL schema files

前端 未结 9 1252
执念已碎
执念已碎 2020-11-27 09:29

I am in charge of several Excel files and SQL schema files. How should I perform better document version control on these files?

I need to know the part modified (di

9条回答
  •  温柔的废话
    2020-11-27 09:59

    Since you've tagged your question with git I assume you are asking about Git usage for this.

    Well, SQL dumps are normal text files so it makes perfect sense to track them with Git. Just create a repository and store them in it. When you get a new version of a file, simply overwrite it and commit, Git will figure out everything for you, and you'll be able to see modification dates, checkout specific versions of this file and compare different versions.

    The same is true for .xlsx if you decompress them. .xlsx files are zipped up directories of XML files (See How to properly assemble a valid xlsx file from its internal sub-components?). Git will view them as binary unless decompressed. It is possible to unzip the .xlsx and track the changes to the individual XML files inside of the archive.

    You could also do this with .xls files, but the problem here is that .xls format is binary, so you can't get meaningful diffs from it. But you'll still be able to see modification history and checkout specific versions.

提交回复
热议问题