title: error: Sparse checkout leaves no entry on working directory
body: <p>First, let me tell you that I have already checked all the similar threads and searched google to find what the problem may be, but no success. My problem is that I'm trying to use sparse checkout in git, but I get this error:</p>
  
  <pre><code>error: Sparse checkout leaves no entry on working directory
  </code></pre>
  
  <p>I have this 60GB repository, which I need to clone. I need only a part of it, so to save a disk space I wanted to use sparse checkout. This is what I do:</p>
  
  <ol>
  <li><code>mkdir repoDir</code></li>
  <li><code>git init repoDir</code></li>
  <li><code>cd repoDir</code></li>
  <li><code>git remote add origin &lt;repo url&gt;</code></li>
  <li><code>git config core.sparsecheckout true</code></li>
  <li><code>echo "some/dir/" &gt;&gt; .git/info/sparse-checkout</code></li>
  <li><code>git pull --depth=1 origin master</code></li>
  </ol>
  
  <p><em>Note I add the remote without -f flag, so nothing is fetched.</em></p>
  
  <p>The result:</p>
  
  <pre><code>error: Sparse checkout leaves no entry on working directory
  </code></pre>
  
  <p>I tried several things:</p>
  
  <ul>
  <li>Instead of initialising new repo and adding the remote manually, I did <code>git clone --no-checkout</code> and then set up the sparse checkout. This didn't help as my <code>git status</code> showed as if I deleted all the files in my repo. The <code>git pull origin master</code> command results in the same error.</li>
  <li>Tried all possible combination of paths in step 6, with preceding slashes, slashes after the path, stars, spaces between path and <code>&gt;</code> or <code>&gt;&gt;</code>. Btw I'm confused what is the correct format here, from the comments on SO I see mutually exclusive ways of formatting this.</li>
  <li>Tried to make sure my <code>.git/info/sparse-checkout</code> is ASCII, and has proper line endings as found <a href="http://git.661346.n2.nabble.com/quot-Sparse-checkout-leaves-no-entry-on-working-directory-quot-all-the-time-on-Windows-7-on-Git-1-8-0-td7603226.html" rel="nofollow">here</a>. This is probably only problematic on Windows, but I just checked this anyway.</li>
  </ul>
  
  <p>My git version: <code>git version 1.9.3 (Apple Git-50)</code></p>
  
  <p>OSX Yosemite 10.10.2 (14C109)</p>