title: How to check and update the submodule revision pointer in Git
body: <p>I have 2 repositories, "A" and "B", that share a 3rd repository "C" as a submodule inside "A" and "B".</p>
  
  <p>My client is TortoiseGit.</p>
  
  <p>If I commit and push a change in the submodule, and go to the parent repository ("A" for example), and right click -> commit in Tortoise, I can see the submodule folder marked as changed. If I commit and push that change, the main repository ("A") will be pointing to the correct/latest revision of the submodule. If I don't commit the change, the main repository will point to the revision of the submodule from before my update.</p>
  
  <p>This is a bit confusing and sometimes causes problems when developers forget to update this pointer of the submodule in the parent/main repository.</p>
  
  <p>So my 1st question is, how can I check, using the command line, which revision of the submodule is my main repository pointing to?</p>
  
  <p>2nd question is, how can I manually edit that revision to point to any arbitrary revision of the submodule, and push that change?</p>
  
  <p>Thank you</p>