What's the simplest .hgignore syntax to ignore a directory and all its contents?
Chris Green
cl at isbd.net
Fri Sep 17 16:48:04 UTC 2021
On Fri, Sep 17, 2021 at 03:23:22PM +0200, Pierre-Yves David wrote:
> On 9/16/21 8:40 PM, Chris Green wrote:
> > As per the subject, if I want to ignore a directory and all its
> > contents and sub-directories what is the easiest way to do this in
> > .hgignore?
> >
> > I'm assuming there is only one directory with the name I want to
> > ignore.
>
> You can simply put the directory name in the hgignore, it should work.
> (what's the directory name ?)
>
OK, thanks for this and the other replies. It wasn't absolutely clear
to me from the documentation that directories can be excluded, all the
.hgignore stuff talks about 'files'.
So if I have a mercurial repository rooted at ~/doc I can put the
following in ~/doc/.hgignore :-
covid
... and both files and directories called 'covid' will be ignored.
--
Chris Green
More information about the Mercurial
mailing list