.hgignore regex syntax to ignore a specific file (e.g. "core") anywhere

Viewed 560

Suppose I have a working directory like this:

  1. t.c
  2. core
  3. multicore
  4. test1/core

I want to ignore all "core" files.

  • If I use "/core$" (4) will get ignored but not (2).
  • If I use "^core$" (2) will get ignored but not (4)
  • If I use "core$" (2) and (4) will get ignored but so will (3) which is not what I want.

How do you do this?

2 Answers
Related