In my global .hgignore
file, I'm ignoring files in the packages/
directory. In this one repo, I want to not ignore that folder.
Is it possible to un ignore a file that has been ignored by a previous .hgignore
?
Committing Ignored Files Tell Git to not ignore this file by prefixing the file name with a ! in . gitignore, i.e. !. env . This will override any global ignore files or ignore files in parent directories.
You can set up a global . gitignore file that lists files that will be ignored on all Git projects. This is the preferred way of ignoring editor artifacts, toolchain log files, OS files, and other miscellaneous crap.
By default, the global gitignore path is ~/. config/git/ignore on Unix/macOS and %USERPROFILE%\git\ignore on Windows.
Assuming that you are using the technique for globally ignoring files described here, then you can override the global ignore locally via editing the repo's hgrc:
Add the following to the file at \.hg\hgrc
[ui]
ignore=.hgignore
This is the local override of the global set in your %userprofile%\Mercurial.ini
(or other files in the config cascade and tells Mercurial to use the .hgignore
file at the root of the repo.
Note that this method then uses none of the global ignore file, so the parts you want to use will need to be in the local .hgignore
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With