title: .gitignore NuGet exclude packages/ include packages/repositories.config
body: <p>I'm trying to create a .gitignore for a Visual Studio project that uses NuGet. It currently contains:</p>
  
  <pre><code>\packages/*
  !packages/repositories.config
  </code></pre>
  
  <p>This does not ignore anything in the folder. Everything gets staged on an add. I have also tried:</p>
  
  <pre><code>packages/
  !packages/repositories.config
  </code></pre>
  
  <p>This ignores everything in the packages folder and does not include the packages/repositories.config.</p>
  
  <p>What am I doing wrong?</p>