title: Is it possible to exclusively make a local copy of a git branch read-only, in order to avoid mistakes?
body: <p>I am working on a git repository for which I have full permissions.</p>
  
  <p>I want to temporarily check out the master branch in order to look at a few files in detail, in order to see how they differ from my feature branch. (The <code>git diff</code> command is very useful, but it would not work for my purposes at the moment.) </p>
  
  <p>I really want to avoid even the possibility of accidentally writing to the master branch. </p>
  
  <p>Is there a simple way to make my local version of the branch read-only for the moment without freezing the branch for everybody else on my team? </p>