Figured it out! I'm going to answer my own question here:
I can use git update-index
in conjunction with git filter-branch --index-filter
.
Here's how to call update-index to modify the commit SHA of a submodule:
git update-index --cacheinfo 160000 88e6a302c42840440f9faac73f27efc6a3e0c1a6 pathto/mysubmodule
As best as I understand it, the 160000 is a magic number in Git used to identify a submodule.