title: Can't set git config values - could not lock config file: File exists
body: <p>I'm trying to set git config values but I keep getting <code>could not lock config file</code> error whenever I try to update them. I've looked around on Stack Overflow and followed the advice to try and remove .gitconfig so that I can recreate it. However, I then get the error <code>No such file or directory</code>. </p>
  
  <p>Does anyone know why this might be happening?</p>
  
  <pre><code>MacBook-Pro-10:~ Chris$ git config --global user.name "Chris Marshall"
  error: could not lock config file /Users/Chris/.gitconfig: File exists
  
  MacBook-Pro-10:~ Chris$ rm ~/.gitconfig
  rm: /Users/Chris/.gitconfig: No such file or directory
  </code></pre>