In my project's .hgignore, I want to exclude /static/ (i.e., the static folder at the root of the directory), but not /templates/static/. How would I configure .hgignore to allow this?
hg - Ignore directory at root only
4.8k Views Asked by BenGC At
2
There are 2 best solutions below
0
On
As of Mercurial 4.9, you can use syntax: rootglob to insert rooted glob patterns.
New rootglob: filename pattern for a glob that is rooted at the root of the repository. See hg help patterns and hg help hgignore for details
You can include
syntax: regexpat the beginning of .hgignore and then use perl regex syntax to root a directory by using^. So just^staticshould do the work.