Search code examples
mercurial

Local Mercurial Ignore File


Is it possible to have a local Mercurial ignore file? Apparently the .hgignore is a file versioned as any other file. Can I have such a file next to the versioned one?


Solution

  • Yes you can configure a local, per-user ignore file. The location and name of this file is defined in the user-specific .hgrc configuration file (usually located in the home directory of the user) under the [ui] section, e.g.:

    [ui]
    ignore = ~/.myhgignore
    

    This file should be in the same format as the repository-wide .hgignore file.

    Reference: http://www.selenic.com/mercurial/hgrc.5.html#ui