Get Off My Lawn

Adventures of a Curmudgeon

NTS: Replace Existing Git Submodule

This is for when you have forked and cloned a repository that contains a submodule you would like to replace with your own implementation:

$> git clone ...$> rm .gitmodule$> rm -r <path to submodule>$> git update-index --force-remove <path to submodule>$> git submodule add <your git url> <path to submodule>$> git submodule init$> git submodule update

If there’s an easier I’d love to know what it is.