问题描述
根据,排除在Git的中将要执行。是吗?
假设我有以下结构:
论文/
论文/ ...
演讲/
演讲/重要演讲
演讲/ ...
现在我想从结帐中排除 presentations / heavy_presentation
,而将其余部分留在结帐中。我还没有设法让这个运行。
我会期望像下面这样的工作:
/ *
!演示文稿/ heavy_presentation
但它没有。我也尝试了许多其他组合。我认为排除没有得到正确实施,并且周围存在错误(仍然)
类似于:
演示文稿/ *
!演示文稿/ heavy_presentation
确实工作,你会得到演示文件夹没有heavy_presentation文件夹。
所以解决方法是显式包括所有其他的。
According to this thread, exclusion in Git's sparse-checkout
feature is supposed to be implemented. Is it?
Assume that I have the following structure:
papers/
papers/...
presentations/
presentations/heavy_presentation
presentations/...
Now I want to exclude presentations/heavy_presentation
from the checkout, while leaving the rest in the checkout. I haven't managed to get this running. What's the right syntax for this?
I would have expected something like the below to work:
/*
!presentations/heavy_presentation
But it doesn't. And I did try many other combinations. I think the exclude is not implemented properly and there are bugs around it (still)
Something like:
presentations/*
!presentations/heavy_presentation
does work though and you will get the presentations folder without the heavy_presentation folder.
So the workaround would be to include everything else explicitly.
这篇关于排除Git稀疏结帐的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!