问题
Did someone manage to configure git to use something like
[includeIf "onbranch:feature/"]
path = ~/.features.gitconfig
I am attaching a tar.gz with a docker's container. You can docker import
it to be able to see the configuration that I have problems running with.
Download docker
回答1:
Make sure you're on Git version 2.23 or later:
- Git 2.13 added the overall
includeIf
idea; but - Git 2.23 is where branch conditionals (
includeIf.onbranch:...
) first appeared.
(Git 2.22 fixed **
operation in these conditionals, but obviously branch conditionals are required in the first place, so there's no issue there.)
来源:https://stackoverflow.com/questions/60625691/includeif-with-branches-in-git