I work in a large shared repo that has submodules that I never touch, but that I can't just git-ignore because sometimes they get changes that affect things I do touch. For instance, if I branch off some new commit from master, I want to have the submodules updated to whatever is on that master commit.I have submodule.recurse set to true in my git config, and everything mostly works how I want it to. However, I sometimes end up accidentally changing a submodule commit, which is annoying. For instance, if I rebase a chain of commits to latest master, and there's a merge conflict when rebasing one of the commits, and I fix it and run git add --all && git rebase --continue, I can end up with the submodule as changed in that commit.
How can I solve this without having to change how I do things? For instance, I still want to use git add --all and not have to worry about this.