title: Git: Switch to local repository from working directory
body: <p>As far I have understood, there are three stages in git workflow - </p>
  
  <ol>
  <li>Working directory which is actual local project workspace with .git file.  </li>
  <li>Staging area where files are added from Working directory to be commited.  </li>
  <li>Local repository where files are commited from the Staging area.</li>
  </ol>
  
  <p>Suppose I have commited several files from the working directory. Those commited files will be in the local repository. Now, I need verify if all the required files are commited by running the project. How can I switch to local repository for running the code to verify commited changes before pushing them to remote?</p>
  
  <p>For example, consider there are 3 files in the working directory - one.js, two.js, three.js and all the files are modified, but only two of them - one.js and two.js needs to be commited which contains inter-dependent changes. But suppose I only commit one.js and forgot to commit two.js and because of this the app will be broken in the local repository. For this case, I need to run and verfiy the app from local repository which contains only commited changes and not all the changes unlike working directory. How to achieve this?</p>