I have a parent git repo with 3 branches in it. I am also using a submodule repo, that has the 3 branches with the same names, and the .gitattributes file in each branch of the parent repo points to the submodules branch of the same name. This is all well and good, but the question I have is, when I do a git checkout BRANCH in the parent repo, I always have to do a git submodule update after, or the files in the submodule directory wont be updated to reflect the correct branch
Is there a simple way to automate this, so that every time I do a checkout the submodule files get updated to reflect the correct branch?