Reputation: 4490
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.
Upvotes: 5
Views: 222
Reputation: 11270
You can use either include
or subinclude
:
include:hg-common/.hgignore
subinclude:hg-common/.hgignore
The difference is that subinclude
confines its effect to the hg-common directory, whereas include
applies the patterns globally.
Upvotes: 3