title: Make git commit using sudo
body: <p>How can one make a git commit of a folder where they don't have write access?  My initial attempt was:</p>
  
  <pre><code>normaluser@host:/etc $ sudo git init
  normaluser@host:/etc $ sudo git commit -m'init'
  </code></pre>
  
  <p>Unfortunately, this will not work.  The regular user has a <code>.gitconfig</code> with the required name and email and I need to have git use those credentials in the commit.  The root user does not have such git credentials, and therefore cannot make a commit.</p>