Alex Rivera | Logout

How can I ignore everything under a folder in Mercurial

Asked 2008-10-31T15:55:25.570
154

I am looking for an expression for the .hgignore file, to ignore all files beneath a specified folder.

eg: I would like to ignore all files and folders beneath bin

Actually any advice on how the expressions are formed would be great

Edit
Report

1 Answer

10

Both of those will also filter out a directory called cabin, which might not be what you want. If you're filtering top-level, you can use:

^/bin/

For bin directories below your root, you can omit the ^. There is no need to specify syntax, regexp is the default.

answered 2008-10-31T22:19:31.893

Your Answer