Repository navigation
[includeIf "gitdir:path/to/folder/"] Windows 11 #5516
Unanswered
prisonerMO
asked this question in
Q&A
Replies: 2 comments
|
Isn't the actual gitdir |
0 replies
|
The trailing slash in your pattern already matches everything underneath that folder. Run these from inside the repo that has the wrong name. git rev-parse --absolute-git-dir
git config --show-origin --get-all user.nameIf the first command shows a path under your work folder, this should match from your global .gitconfig. [includeIf "gitdir/i:C:/Users/username/work/"]
path = .gitconfig-workThat relative path is resolved beside the config containing the include. Put the include after your default [user] section. If the second command shows the work value followed by one from .git/config, the repo-local value is winning. If it never shows the work file, focus on the path match and the location of .gitconfig-work. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hello,
I have tried with many different way to define include if .config in .git config
Using windows 11
Git version 2.49.0
i have tried with gitdir/i: and without.
Example
includeIf "gitdir:C:/Users/username/work/"]
path = .gitconfig-work
Located git config in ~/ and in work folder.
Still git config user.name returns my global user name
All reactions