i faced an issue while working on git branches. In the master branch, i have a submodule with tag v2.0 included. I branched out on to a new branch say fix, and made some changes to its artefacts and also updated the submodule to v3.0 via "git checkout v3.0". This i did a commit. Now i switched back to master, with "git checkout master". It displays a message "M submodule" indicating that the submodule configuration is changed and shows a new change. The submodule had changed to v3.0 in the master branch also on its own.
Why does this happen. Why cant i switch between branches without automatic altering of submodule versions?
git statusoutput before switching branches? Does it display any modification to the submodule? (also trygit status -s)