Tracking git submodules with chezmoi

Eric Steven Crosson
2 min readJan 17, 2022

I’ve been using the helix editor lately, and wanted to manage my install-from-source configuration with chezmoi along with the rest of my dotfiles. I couldn’t find any resources on using chezmoi with git submodules so I’m recording my findings in this article.

This post assumes you are familiar with git and chezmoi, and describes how to run a chezmoi script once when the hash of a git submodule changes. This script can be used, for example, to build and install the contents of the submodule.

--

--