Git is My Hammer; Everything is a Nail

A few days ago, I mentioned that I use Git to synchronize work between several different devices and across several different platforms. This setup has served me well, and so today I want to talk about it in detail.

I use Git for everything. It manages the dotfiles that configure my applications. It tracks the articles I write for this website, the code that builds these pages, and even handles their deployment through GitHub Pages. For the last two years, most of my long-form writing has been in the TeX typesetting language; Git handles all of those projects, too. I have integrated Git so tightly into my workflow that I even use it to version binary files like Word documents and PowerPoint presentations. At work, we use Git to store and collaborate on team documentation, training material, and professional development resources. Git is my hammer, and through its lens I see everything as a nail.

In a conventional setup, my workflow would involve making edits on a local workstation and then pushing those changes to a remote Git server. From there, others could pull the changes into their local repository, work, push, and repeat. I do not have a conventional setup. The diagram below depicts my current workflow.

GitHub, at the center of the diagram, is my single source of truth. All my projects reside there. Whether at home, at work, or on a mobile device, though, Overleaf is the primary interface through which I interact with those projects. A personal plan allows me to sync my GitHub repositories into Overleaf, where I can then view, edit, and ultimately push changes back to GitHub via a clean, intuitive web interface. Overleaf’s online editor handles Markdown, which I write these blog posts in, as well as TeX, which I use for everything else.

I also have the ability to work with my projects locally via Git on both my home computer and mobile devices. Any changes I make there can be pushed to GitHub and then pulled from GitHub into Overleaf. My home and mobile devices also allow me to push certain repositories to a secondary GitLab server for additional redundancy and easier collaboration. Of course, I can also access GitHub or GitLab via any device to edit files through their web interfaces; once committed, those changes propagate throughout this little ecosystem via Git.

This approach has several benefits.

I love this setup. Overleaf takes away the pain of working with TeX files while also allowing me to write other, simpler documents through the same editor. Git on the back-end keeps everything in sync so I can work across devices, almost anywhere. This setup has served me well, and I think it will continue to going forward.

 At one point I also pushed to a third Git server for even more redundancy, but this seemed like overkill.

Permalink.