mercurialhgignore

Way to include one .hgignore file in another


Is there any way to include one .hgignore file in another?

e.g., say I have a common .hgignore file in a Mercurial subrepository (named hg-common) that ignores files like desktop.ini & .DS_Store, and I want to include that file in every project that I create. In my .hgignore of my project1 repo, I want to do something like:

syntax: include hg-common/.hgignore

with syntax: include being my imaginary syntax for including the specified file.


Solution

  • I found the correct syntax:

    include:hg-common/.hgignore