开发者

Confusing .gitignore syntax

开发者 https://www.devze.com 2022-12-31 08:35 出处:网络
I was reading http://www.kernel.org/pub/software/scm/git/docs/v1.7.10/gitignore.html and the 6 points used to explain the ignore patterns seem 开发者_如何学JAVAto be describing a custom variant of a g

I was reading http://www.kernel.org/pub/software/scm/git/docs/v1.7.10/gitignore.html and the 6 points used to explain the ignore patterns seem 开发者_如何学JAVAto be describing a custom variant of a glob search syntax. I am more familiar with Mercurial, which allows to explicitly ignore via glob or regex patterns, no questions asked.

  • Is there any similar functionality in Git?
  • Can anyone point me to some more exhaustive reference than the Git man page?

Best,

t


There is no built-in way of excluding by regex. If there were, you'd see it on the man page.


Not exactly. It can be used a bash-like syntax where you can specify something like this:

*tmp_*~

which is the same as the regExp: .*tmp_.*~

Hope this will help you!

0

精彩评论

暂无评论...
验证码 换一张
取 消