Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

.gitignore un-ignore equivalent in .hgignore

In the .gitignore syntax there is an option where you can have a ! at the beginning of the file and it will un-ignore any previously ignored files.

So I can have the following:

logs/*
!logs/stuff.txt

And logs/stuff.txt will still be tracked.

What is the Mercurial .hgignore equivalent for this?

like image 648
greduan Avatar asked Jan 07 '14 03:01

greduan


1 Answers

The equivalent is just adding the file. Once a file has been hg added the .hgignore file has absolutely no effect on how it's treated, so you ignore logs/* (be sure you're in glob mode, not regex mode) and then hg add logs/stuff.txt.

like image 157
Ry4an Brase Avatar answered Oct 11 '22 09:10

Ry4an Brase