I have a repo with 2 submods inside of it. When in the main repo and switching branches, or pulling changes, seemingly at random, the submods will leave the branch I told them to be on and switch to "HEAD (string of numbers and letters)". I know this is the version of the submodule I last pushed to my main repo, but that's not what I want.
This is demolishing my workflow, and making me lose submod changes sometimes. I need git to never, ever, under any circumstances, change the branch I set my two submods to be on, no matter what I do to the main repo. How do I make that possible?