Hgignore: ignore all but one .lib file

For my class project, my team uses hg to work together, and I made an ignore file from a verified answer from this question with a few additions. However, there is a problem. I have a .lib file needed to run the code, and I want it to be stored in the repository.

Since this .hgignore uses glob, so am I, since I can let the comp345_dnd / RollPlay.lib file (the root folder contain comp345_dnd) be in / observable while * .lib is ignored?

+7
source share
2 answers

Just manually add hg to a specific file (without any wildcards), for example:

hg add /path/to/file 

This overrides the .hgignore file and adds the file to the repository.

+14
source

to quote Matt Mackall in the old entry in the mercurial-devel list : Mercurial will add any files explicitly specified on the command line, regardless of ignoring rules.

+2
source

All Articles