title: How to revert a Git Submodule pointer to the commit stored in the containing repository?
body: <p>I have a git submodule in my main git repo. As I understand it, the main repo stores a SHA value (somewhere...), pointing to the specific commit of the submodule that it is "linked to". </p>
  
  <p>I went in to my submodule and typed <code>git checkout some_other_branch</code>. I have no idea which commit I came from.</p>
  
  <p>I would like to revert that pointer so that the main repo and the submodule are in sync again.</p>
  
  <p>My first (probably naive) instinct was to say <code>git reset --hard</code> - that seems to work for everything else. To my surprise, it did not work for this scenario.</p>
  
  <p>So I've figured out that I can type <code>git diff</code>, note the SHA ID that the submodule pointer used to have, and then head into the submodule and <code>git checkout [SHA ID]</code>... but surely there must be an easier way?</p>
  
  <p>As I'm still learning about git submodules, please feel free to correct my terminology if there are words for concepts that I don't know.</p>