Site Tools


Differences

This shows you the differences between two versions of the page.

Link to this comparison view

blog:2016:04:24:gitconfig-supports-includes [2020-04-26] – created dcaiblog:2016:04:24:gitconfig-supports-includes [2020-04-26] (current) dcai
Line 1: Line 1:
 +==== .gitconfig Supports Includes ====
  
 +
 +24 Apr 2016
 +
 +
 +I have this ''.gitconfig'' sharing with my team, but I have to remove ''user section'' / ''gpg sign key'' / ''github credentials'' before sending out, I wish there was an option to include options from separate file, and there is! Please see https://git-scm.com/docs/git-config#_includes, you can add following to ''.gitconfig'':
 +
 +<code>
 +[include]
 +    path = ~/.gitconfig.local
 +</code>
 +
 +Then move all your credentials to ''.gitconfig.local''.