DEV Community

loading...

Discussion on: Setting up multiple GitHub accounts, the nicer way

Collapse
yafkari profile image
Younes

Hi Arnelle,

Thank's for this tip !

Is it possible to do something like this :

[includeIf "gitdir:C:/USER/Documents/Programming/*/School/*"]
Enter fullscreen mode Exit fullscreen mode

Thank's again !

Collapse
mariuszzawadzki profile image
Mariusz Zawadzki • Edited

From documentation I would say, no. ( git-scm.com/docs/git-config#Docume... ).

But I just checked it in WSL and it looks to work.

Correction. Iput:
[includeIf "gitdir:~/work/*/ome"]
[user]
email = "work@email.com"

And it matched
~/work/test

So it seems to match to much.or just ignores everything after a wildcard.

I would suggest using symlinks, but I see that you are using windows.

Collapse
yafkari profile image
Younes

Thank's man !

Thread Thread
mariuszzawadzki profile image
Mariusz Zawadzki • Edited

@yafkari : it looks like it matches to much. Please read comment above.

Maybe if you are constrained to windows try using WSL and then symlinks there. (but works with Windows 10 only :( ).