title: global git config file does not exist
body: <p>git: <strong>git version 2.10.1 (Apple Git-78)</strong><br>
  macOS: <strong>10.12.3</strong></p>
  
  <hr>
  
  <p>I am (was) having some issues with git, everything committed locally and then pushed up to GitHub is (was) not referenced in my account but rather committed by an unknown user.</p>
  
  <p>I googled some online, as I always do, and came to this conclusion. The git config had been messed with. (Prev commits are fine etc.)</p>
  
  <p>Naturally I tried setting my email in the git config to match the one on GitHub, this way GitHub would automatically notice the (new) commits are mine and everything would be fine..</p>
  
  <p>So I ran  </p>
  
  <pre><code>git config --global user.email &lt;my-email@email.com&gt;
  </code></pre>
  
  <p>Without success... The following error was returned to me:   </p>
  
  <pre><code>error: could not lock config file /Users/&lt;user&gt;/.gitconfig: No such file or directory
  </code></pre>
  
  <p>I tried to reinstall/update git by downloading the latest version <a href="https://git-scm.com/download/mac" rel="noreferrer">here</a>.  </p>
  
  <p>Running <code>git config --global -l</code> to list all of the configs returns the following error: </p>
  
  <pre><code>fatal: unable to read config file '/Users/&lt;user&gt;/.gitconfig': No such file or directory
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/2pK6F.png" rel="noreferrer"><img src="https://i.stack.imgur.com/2pK6F.png" alt="terminal screenshot"></a></p>
  
  <hr>
  
  <h3>Conclusion</h3>
  
  <p>The file does not seem to exist. As you can see in the screenshot.   Reinstalling git via their website did not initiate the config file.<br>
  I have no clue what to do...</p>
  
  <hr>
  
  <p><strong>Other posts</strong>:<br>
  I tried resolving this issue by going trough other related answers etc. However this did <strong>not</strong> help me resolve this issue. I think my case is a little more specific than most cases...</p>
  
  <hr>
  
  <h2>update</h2>
  
  <p>Tried to create the folders: 
  <a href="https://i.stack.imgur.com/EryI1.png" rel="noreferrer"><img src="https://i.stack.imgur.com/EryI1.png" alt="update screenshot"></a></p>