title: Adding folders to .gitignore
body: <p>Please help me with a git ignoring.</p>
  
  <p>I have files in the public/images directory and don't want to track them. But I need to track files in the /public/images/bonus2 directory. I used this code, and it works.</p>
  
  <pre><code>/public/images/
  !/public/images/bonus2/
  </code></pre>
  
  <p>But when I try to move tracked files from public/images/bonus2 to public/images/bonus_ordering and make .gitignore like that:</p>
  
  <pre><code>/public/images/
  !/public/images/bonus2/
  !/public/images/bonus_ordering/
  </code></pre>
  
  <p>and make this command:</p>
  
  <pre><code>mv public/images/bonus2 public/images/bonus_ordering
  </code></pre>
  
  <p>git track that files in public/images/bonus2 removed, but it don't track that new files public/uploads/bonus_ordering appeared.</p>
  
  <p>I used git add -f public/images/bonus_ordering, but I think that is not good solution. What I need to do instead of that?</p>