0
votes

I need to ignore all files in whole project tree, versioned by Mercurial, that starts with specific character. Let's say underscore (or it may be some other).

I searched on google a lot, but I cannot find right glob syntax. I found glob expression test environment, where I could try patterns, but nothing works for me.

Consider following project structure:

/function/_backup/file1.php
/function/_backup/file2.php
/function/Class/A.php
/function/Class/_B.php
/_graph/1.jpg
/.hgignore
/.htaccess
/_index.php
/index.php

The only files that I need to propagate to repository are A.php, .htaccess and index.php.

The question is: how should my .hgignore look like?

1

1 Answers

1
votes

You should add the following line to .hgignore:

glob:_*