title: Hiding GitHub token in .gitconfig
body: <p>I would like to store all of my dotfiles on GitHub, including .gitconfig which requires me to hide the GitHub token in the .gitconfig.</p>
  
  <p>To do so I have a ".gitconfig-hidden-token" file which is the file I intend to edit and put under git that hides the token:</p>
  
  <pre><code>...
  [github]
  user = giuliop
  token = --hidden--
  ...
  </code></pre>
  
  <p>And a shell script which I need to launch if I modify the ".gitconfig-hidden-token" file  to create the ".gitconfig" file:</p>
  
  <pre><code>cp .gitconfig .gitconfig.backup
  sed 's/--hidden--/123456789/' .gitconfig-hidden-token &gt; .gitconfig
  </code></pre>
  
  <p>The drawback is the need to manually launch the script everytime I modidy the file. Is there a better, fully automated way to do this? </p>