title: How to switch git submodule with other branch properly?
body: <p>I have repo, which contain lots of submodules. Every submodule was initialized with <code>-b branch_rev_1</code>. I want to switch state of this repo, changing every submodule's branch with <code>-b branch_rev_2</code> (so I will be able to build app with different revision of dependencies).</p>
  
  <p>But making <code>checkout -b branch_rev_2</code> inside submodule's directory does not change record in <code>.gitmodules</code> file.
  Is there any way for switch state of all submodules after changing branch name in <code>.gitmodules</code> file (or vice versa, sync <code>.gitmodules</code> description and other configuration in .git folder after checking out specific revision inside submodule) ?</p>