title: How to remove (not ignore) specific files using .gitignore?
body: <p>Below is the image of my project structure:</p>
  
  <p><a href="https://i.stack.imgur.com/qBHQM.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/qBHQM.png" alt="enter image description here"></a></p>
  
  <p>I would like to delete .vs folder, packages folder, .hgignore file and bin and obj directories under Leapfrog.Datafetcher, Leapfrog.Test, and src/LeapfrogDataService.</p>
  
  <p>As of now, my .gitignore file looks like</p>
  
  <pre><code>## Ignore Visual Studio temporary files, build results, and
  ## files generated by popular Visual Studio add-ons.
  ##
  ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
  
  # User-specific files
  *.suo
  *.user
  *.userosscache
  *.sln.docstates
  packages
  .hgignore
  
  # User-specific files (MonoDevelop/Xamarin Studio)
  *.userprefs
  
  # Build results
  [Dd]ebug/
  [Dd]ebugPublic/
  [Rr]elease/
  [Rr]eleases/
  x64/
  x86/
  bld/
  [Bb]in/
  [Oo]bj/
  [Ll]og/
  
  # Visual Studio 2015 cache/options directory
  .vs/
  </code></pre>
  
  <p>Can anyone let me know what is missing in a .gitignore file or is there anything wrong with my path?</p>