Git includeIf for personal and work profiles doesn’t work

You need to remove one space in:

[includeIf "gitdir: F:/Work/CompanyName/"]

i.e., make this read:

[includeIf "gitdir:F:/Work/CompanyName/"]

Note the lack of a blank between the colon after gitdir and the path name to be tested.

(Your Git also needs to be at least version 2.13. You might consider using gitdir/i:f:/work/companyname/ so that you are not case-sensitive here, assuming your host system is also not case-sensitive, as the F: part suggests. The final slash is important as well; don’t omit it without understanding what it does)

Leave a Comment

tech