title: Git stages changes that should be ignored by the .gitignore
body: <p>I've made a Unity Project and want to exclude some folders. I made the .gitignore look like this:</p>
  <pre><code>[Ll]ibrary/
  [Tt]emp/
  [Oo]bj/
  [Bb]uild/
  [Bb]uilds/
  [Ll]ogs/
  [Uu]ser[Ss]ettings/
  
  # Visual Studio cache directory
  .vs/
  
  # Autogenerated VS/MD/Consuelo solution and project files
  ExportedObj/
  .consulo/
  *.csproj
  *.unityproj
  *.sln
  *.suo
  *.tmp
  *.user
  *.userprefs
  *.pidb
  *.booproj
  *.svd
  *.pdb
  *.mdb
  *.opendb
  *.VC.db
  </code></pre>
  <p>But some files in that folders are still being staged.</p>
  <p>List of changes:</p>
  <p><a href="https://i.stack.imgur.com/qk5QL.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/qk5QL.png" alt="enter image description here" /></a></p>