I’d like to have a ~/.gitconfig
containing redirections of different URLs (here for sake of simplicity “aaa” and “bbb”) onto the same one (again for simplicity “1234”)
I can do this if I write the file manually, but I’ve noticed that if instead I set it via git config
the 2nd setting is going to elide the previous one:
╭─
╰─ : > ~/.gitconfig && cat ~/.gitconfig
╭─
╰─ git config --global url."1234".insteadOf "aaa" && cat ~/.gitconfig
[url "1234"]
insteadOf = aaa
╭─
╰─ git config --global url."1234".insteadOf "bbb" && cat ~/.gitconfig
[url "1234"]
insteadOf = bbb
I would have expected to have a ~/.gitconfig
containing this (like I was able to do manually):
[url "1234"]
insteadOf = aaa
[url "1234"]
insteadOf = bbb
I’m on last git version:
╭─
╰─ git -v
git version 2.45.0