title: .gitignore entire directory with whitespace in name
body: <h1>Goal</h1>
  
  <p>Trying to ignore the annoyingly-named "TextMesh Pro" directory, underneath an "Assets" folder (full path from the root where .gitignore resides is "Sky Labyrinth\Assets\Text Mesh Pro\").</p>
  
  <h1>Attempted</h1>
  
  <p>I followed the suggestions in 3 threads (<a href="https://stackoverflow.com/questions/19684620/gitignore-not-ignoring-filenames-with-spaces-in-them-on-git-status">one</a>, <a href="https://stackoverflow.com/questions/10213653/gitignore-ignore-files-within-a-folder-that-has-whitespace-in-the-middle">two</a>, <a href="https://stackoverflow.com/questions/3675641/git-ignore-for-directories-with-spaces-on-mac-os-x">three</a>) unsuccessfully.</p>
  
  <p>In the actual .gitignore file I tried:</p>
  
  <pre><code>TextMesh Pro/
  TextMesh\ Pro/
  **/TextMesh Pro/
  **/TextMesh\ Pro/
  \Assets\TextMesh Pro\
  \Assets\TextMesh/ Pro\
  **\Assets\TextMesh Pro\
  **\Assets\TextMesh/ Pro\
  "\TextMesh Pro\"
  "**\TextMesh Pro\"
  </code></pre>
  
  <p>And a bunch of other combinations that I didn't expect to work (that did indeed not work).</p>
  
  <h1>Ruled Out</h1>
  
  <p>The files are not cached, I have never committed anything from that directory. Just to be sure, I ran:</p>
  
  <pre><code>git rm -r --cached "Sky Labyrinth\Assets\Text Mesh Pro\"
  </code></pre>
  
  <p>which did not match anything. Just to be doubly sure, I ran</p>
  
  <pre><code>git reset --hard
  </code></pre>
  
  <p>and re-imported the asset. There is a minor caveat I guess, I did commit a .Unity scene change that had some TextMesh Pro gameobjects inside it; despite my lack of expert Git knowledge I'm pretty sure that shouldn't magically make stuff inside the Assets\TextMesh Pro\ directory get cached or somehow un-ignorable.</p>
  
  <h1>Halp</h1>
  
  <p>Any ideas on how to correctly ignore an entire sub-directory that has whitespace inside the name? I don't need to ignore specific files inside it, I want the whole thing ignored. I understand that as a workaround I could either:</p>
  
  <ol>
  <li><p>Manually remove the whitespace from the directory name - but anytime I update the plugin I have to repeat this</p></li>
  <li><p>Make another .gitignore inside the \TextMesh Pro\ directory that ignores everything inside with</p>
  
  <p>/*</p>
  
  <p>which will be my last resort since it's the only thing I've gotten to work. However I'd prefer to understand how to correctly deal with whitespaces in directory names, or learn that it's simply not possible if that's the case.</p></li>
  </ol>