title: git and local modifications
body: <p>I am discovering how to use git.</p>
  
  <p>I just made the following test:</p>
  
  <ol>
  <li>create a folder and 2 files</li>
  <li>then git init, git add ., git commit -m "initial commit"</li>
  <li>create a branch: git branch experimental, git checkout experimental</li>
  <li>then change the name of the folder and delete one of the files, then git add ., git commit -m "experimental"</li>
  <li><p>go back to master: git checkout master</p>
  
  <p>Surprise: I do not find the master as I left it; the folder has disappeared. And I have to do a git -reset --hard to find my folder.</p>
  
  <p>I wonder if I did something wrong or if I have not understood how git manages local changes. Thanks for your help.</p></li>
  </ol>
  
  <p>Detailed scenario:</p>
  
  <pre><code>mkdir GitTest
  cd GitTest/
  mkdir Folder1
  echo "master" &gt; Folder1/File1.txt
  echo "master" &gt; File2.txt
  git init
  git add .
  git commit -m "init"
  git branch expe
  git checkout expe
  mv File2.txt File3.txt 
  mv Folder1/ Folder1-exp/
  echo "expe" &gt;&gt; Folder1-exp/File1.txt 
  git add .  
  git commit -m "expe"
  git checkout master
  ls
  git checkout expe
  ls
  </code></pre>