title: git clone succeeded, but checkout failed; due to folders having leading or trailing spaces
body: <p>I usually commit to a project from a macOS, and I didn't notice that leading and trailing space were embedded accidentally in folder names, but lately I tried to clone the repo from Windows, 
  I get this error:</p>
  
  <pre><code>fatal: cannot create directory at 'FolderName /SubFolderName'
  warning: Clone succeeded, but checkout failed.
  </code></pre>
  
  <p>Is there a way to checkout successfully from windows without modifying from the mac? What to do to prevent Leading and trailing spaces that cause checkout failure in Windows? Is there a way to force Finder to highlight all leading or trailing spaces in macOS ?, or even better: reject them for compatibility purposes?</p>