ckrf / xlsx-git

Convert .xlsx files to XML before committing them to git
GNU General Public License v2.0
41 stars 13 forks source link

Changes to Excel files are not protected if you checkout another commit #1

Closed ckrf closed 9 years ago

ckrf commented 9 years ago

Because the xlsx file is not in the commit, there's no warning that you have to stash your work or committing before it will be overwritten by a checkout.

ckrf commented 9 years ago

This is fixed in v0.02, with the "placeholder model". Now, instead of keeping the file "[name].xlsx" out of the repository, the pre-commit hook commits a text file called "[name].xlsx" with the SHA-1 hash of the actual xlsx file. The placeholder model prevents checkouts until you have stashed all of your Excel files away where you can recover them.