title: Git: How to add files and subfolders in a gitignore'd folder
body: <p>Suppose I have a folder </p>
  
  <pre><code>application/uploads
  </code></pre>
  
  <p><strong>EDIT</strong></p>
  
  <pre><code>application/uploads/{a}/{b}/{c}/{d}/{e}/{f}/{g}/abcdefghijklmnopqrstuvwxyz
  </code></pre>
  
  <p><code>{a},{b},{c},{d},{e},{f},{g}</code> - are hash keys, any alpha-numeric characters are possible</p>
  
  <pre><code>abcdefghijklmnopqrstuvwxyz - is a hashed filename
  </code></pre>
  
  <p>I don't want git to track it neither on development machines nor on production server, so it is added to a .gitignore file.</p>
  
  <p>Suppose now I've created a branch "Backups" on the production server where I want to store the state of the project at different moments of time.</p>
  
  <p>To do that I need to 'add' and 'commit' all files of a project including those which are under .gitignore</p>
  
  <p>Note: Changing .gitignore is a bad idea in general because</p>
  
  <ol>
  <li><p>It might cause problems when pulling changes from develment branches</p></li>
  <li><p>In a heavily loaded and recently changing project it will be a problem to checkout other branch because of new untracked files that are added each second right after you finished adding and commiting the previous ones</p></li>
  <li><p>etc...</p></li>
  </ol>
  
  <p>So the question: How do I force git to 'add' files that are under .gitignore ad then 'commit' them without actually changing .gitignore?</p>