How to make mercurial ignore all hidden files?

前端 未结 2 1443
野的像风
野的像风 2021-02-05 17:58

I hate seeing nearly every directory in my repository list each file twice, once with a dot in front of it and once without. I tried adding .* to my .hgignore file,

2条回答
  •  没有蜡笔的小新
    2021-02-05 18:17

    I use this in my .hgignore:

    syntax: regexp
    
    # dotfiles
    (?

    Which reads: periods not preceded by something other than a forward slash.

    Ry4an's solution is also good, I've used that one before too. Not sure which is more efficient.

    https://regex101.com/r/dB4bW7/1

提交回复
热议问题