title: Git: How does checking out affect the repository?
body: <p>I'm not at all experienced with programming, and I'm just starting to learn Git. I don't understand how <code>git checkout</code> works.</p>
  
  <p>According to <a href="https://www.atlassian.com/git/tutorials/viewing-old-commits">this</a>:</p>
  
  <blockquote>
    <p>Checking out an old commit is a read-only operation. It’s impossible to harm your repository while viewing an old revision. The “current” state of your project remains untouched in the master branch.</p>
  </blockquote>
  
  <p>Yet the paragraph below, they state this:</p>
  
  <blockquote>
    <p>On the other hand, checking out an old file does affect the current state of your repository.</p>
  </blockquote>
  
  <p>Seems to me to be completely contradictory. Could someone please explain this to me in layman's terms? </p>