title: gitconfig ignoring includeIf
body: <p>I am trying to set up my git config so that I can use a work environment and a personnal environment.</p>
  <p>Here is the contents of my <code>~.gitconfig</code> file (it so happens work and private are on github):</p>
  <pre><code> [url &quot;git@github.com:&quot;]
      insteadOf = https://github.com/
   [core]
      editor = vim
   [includeIf &quot;gitdir:~/go/src/github.com/work/&quot;]
      path = ~/.gitconfig-work
   [includeIf &quot;gitdir:~/go/src/github.com/fzd/&quot;]
      path = ~/.gitconfig-private
  </code></pre>
  <p>Here are the contents of both files :</p>
  <pre class="lang-sh prettyprint-override"><code>&gt; cat ~/.gitconfig-work
  [user]
      email = workerID@company.com
      name = realname
      signingkey = 454684684654...
  [commit]
      gpgSign = true
  
  &gt; cat ~/.gitconfig-private
  [user]
      email = fzd@email.com
      name = fzd
  </code></pre>
  <p>Now let's wander to one of these directories :</p>
  <pre class="lang-sh prettyprint-override"><code>&gt; cd ~/go/src/github.com/work/
  &gt; git config --get user.email  
  &gt; 
  
  &gt; cd ~/go/src/github.com/fzd/
  &gt; git config --get user.name
  &gt; 
  </code></pre>
  <p>None of the above returned a string.</p>
  <p>I was expecting this to work (and it would have solved my troublesome git configuration).</p>
  <p>Now, the &quot;fun&quot; part: This config was initially my work config, with only work set properly.
  When I try to clone a repo from github, wherever I am, it's using my work settings (I haven't restarted since I tried messing around with git - I suppose it's  not yet worth it).</p>
  <p>Can anyone tell me what I've done wrong with my config ? And why is it using the work parameters ? Is there a kind of cache over the git config ?</p>
  <p>[edit]
  Here are the contents of my <code>~/.ssh/config</code> file:</p>
  <pre class="lang-sh prettyprint-override"><code> Host github.com
       Hostname ssh.github.com
       Port 443
   
   Host *
    ServerAliveInterval 10
    AddKeysToAgent yes
    IgnoreUnknown UseKeychain
    UseKeychain yes
    IdentityFile ~/.ssh/id_ed25519_work
  </code></pre>
  <p>I do have a key pair for the private repos, I'm not entirely sure how to have both here. Probably something like <a href="https://www.section.io/engineering-education/using-multiple-ssh-keys-for-multiple-github-accounts/" rel="nofollow noreferrer">this</a>.</p>