In my mercurial.ini file, I call a global hgignore file like this:
[ui]
ignore = ~/hgignore.ini
This refers to a hgignore.ini file which is in the same directory as the mercurial.ini file.
- Does the local hgignore override the global hgignore?
- If so, is it recommended to have a single global hgignore with relevant sections marked or have a global hgignore file for general patterns and individual local hgignore files for special patterns pertaining to the particular repo?
By global hgignore with relevant sections marked, I mean:
syntax: glob
# VISUAL STUDIO
*.obj
*.pdb
*.suo
[Bb]in
[Dd]ebug*/
[Rr]elease*/
# TEMPORARY FILES
*.log
*.bak
*.cache
hgignore.ini
is the Windows name; on other OSes this must be~/.hgrc
. – Rathskeller~/.hgignore
on Unix systems. – Prelusive%USERPROFILE%/mercurial.ini
on Windows and~/.hgrc
on Linux/Unix (though%USERPROFILE%/.hgrc
is also allowed on Windows). This is detailed inhg help hgrc
. The global ignore file can of course be called whatever you want, since the path is explicitly specified in the config file. – Chambermaid