ignoring folders in mercurial

后端 未结 4 1110
余生分开走
余生分开走 2020-12-15 17:07

Caveat: I try all the posibilities listed here: How can I ignore everything under a folder in Mercurial.
None works as I hope.

I want to ignor

4条回答
  •  时光取名叫无心
    2020-12-15 17:23

    Both cases worked for me (on linux and windows):

    syntax: regexp
    ^backup/     #root folder
    nbproject/   #any folder
    

    or

    syntax: glob
    ./backup/*   #root folder
    nbproject/*  #any folder
    

    However, it wasn't before I added a link to .hgignore file to .hgrc file in my repo:

    [ui]
    ignore = .hg/.hgignore
    

    Also worth mentioning that mercurial ignores files that it is not currently tracking, which are those added before you configured it to ignore them. So, don't be put off by hg status saying some filed are M (modified) or ! (missing) in the folders that you have just added to the ignore list!

提交回复
热议问题