title: Git - fatal: Could not get current working directory?
body: <p>When I <code>git clone</code> from a repo, I get,</p>
  
  <p><code>fatal: Could not get current working directory: No such file or directory</code></p>
  
  <p>What do I do? I have checked the server and found that <code>.git</code> file exists. The server is running a Gitlab instance. I have configured <code>ssh</code> properly with the keys, and I've been committing &amp; cloning for a while now without any error, and this happens all of a sudden.</p>
  
  <p>FWIW, I'm doing the <code>git clone</code> in a bash script.</p>
  
  <hr>
  
  <p><strong>Update</strong></p>
  
  <p>This is my bash script,</p>
  
  <pre><code>for repo in $repos
  do
     git clone $repo /tmp/tmpdir/
     # do stuff with /tmp/tmpdir/
     rm -rf /tmp/tmpdir/
  done
  </code></pre>
  
  <p>for the first <code>repo</code> it's fine, but when the <code>for</code> gets into the second <code>repo</code> it fails and gives the above <code>fatal</code> error.</p>