includeIf与git中的分支 [英] includeIf with branches in git
本文介绍了includeIf与git中的分支的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否有人设法将git配置为使用类似的东西
Did someone manage to configure git to use something like
[includeIf "onbranch:feature/"]
path = ~/.features.gitconfig
我将tar.gz附加到码头工人的容器上。您可以 docker import
来查看运行时遇到问题的配置。
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.
推荐答案
确保您使用的是Git 2.23或更高版本:
Make sure you're on Git version 2.23 or later:
- Git 2.13添加了总体
includeIf
想法;但是 - Git 2.23是分支条件条件(
includeIf.onbranch:...
)首次出现的地方。
- Git 2.13 added the overall
includeIf
idea; but - Git 2.23 is where branch conditionals (
includeIf.onbranch:...
) first appeared.
(在这些条件语句中,Git 2.22已修复 **
操作,但显然首先需要分支条件语句,所以那里没有问题。)
(Git 2.22 fixed **
operation in these conditionals, but obviously branch conditionals are required in the first place, so there's no issue there.)
这篇关于includeIf与git中的分支的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文