title: Checking out a particular revision of a Git repo via CMake
body: <p>CMake supports checking out git and mercurial repositories through the following components:</p>
  
  <ol>
  <li><a href="http://cmake.org/cmake/help/v2.8.11/cmake.html#module:FindGit" rel="nofollow">http://cmake.org/cmake/help/v2.8.11/cmake.html#module:FindGit</a></li>
  <li><a href="http://cmake.org/cmake/help/v2.8.11/cmake.html#module:FindHg" rel="nofollow">http://cmake.org/cmake/help/v2.8.11/cmake.html#module:FindHg</a></li>
  </ol>
  
  <p>but the problem is that, while mercurial supports directly checking out a specific revision, git does not (one must checkout the repository, move into the folder, and then checkout the revision). </p>
  
  <p>This is problematic because I develop a chain of libraries, where each builds on top of the last, and so it is useful for me to be able to have library B check out the last compatible revision of upstream library A. This was one command with FindHg.</p>
  
  <p>What is the pragmatic way to mirror this functionality with git? </p>