includeIf with branches in git

淺唱寂寞╮ 提交于 2020-03-25 15:19:40

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!