hgignore¶
It is very helpul to setup a ignore config to keep the repo clean from generated or system depended files.
There are two main locations to keep and manage ignores:
- Repository
a file directly added to the repo on root level: .hgignore
used for generated files - System
define the path to the ignore file in your hgrc and setup the ignroe fiel it the same way
used for system depended files
Ignore file:
hgrc section ui:
Examples (Regex)¶
for repo ignore rules:
\.nfo$ \.grf$ Makefile\.local Makefile\.depfor system ignore rules:
- Common
\.renum \.bak$ \.log$ \.orig$ \.rej$ \.diff$
- Linux
~$ \.directory
- Mac
\.DS_Store Thumbs\.db
Tips¶
Already added files can get removed from the repo with
hg forget
(help with hg help forget)