Using Github to Write Essays

Author Avatar
Ziyao Zhang Jul 18, 2017

While I was working on my college essays, I first took the conventional approach of version control - creating a timestamped file for each version I wrote. It worked fine at first, but it soon became somewhat messy. When I ran into a situation where I needed to write two parallel versions of the same essay at the same time, I turned to git.

Created to keep track of large code bases, git allows you to look at any file change and revert to points back in time. It has been meticulously designed not to lose any user data, which is great if you are tracking important documents like code or college essays. Git also allows you to create new branches, so you can work on two or more different ideas of an essay at the same time without confusion and even merge them together if you wanted to.

However, there’s one problem: git only tracks plain text files like markdown or latex. Since I am used to writing documents in Microsoft Word, I wrote a script that can automatically convert any given docx file to a text file when it detects a file change. See here for its code and instructions on how to use it.

Once you have the script set up, you can now use git to track your documents, and you can upload your documents to Github for easy accessibility and branch visualization. If you ran into any problems, feel free to drop me a comment. I will be glad to help.