63

I know about .hgignore and how I can ignore files on a project-by-project basis. I want to ignore stuff for all Mercurial repositories.

Is there something I can stick in .hgrc? Or put a .hgignore in my $HOME path (I tried that already but maybe I did something wrong).

Martin Geisler
  • 72,968
  • 25
  • 171
  • 229
mikeycgto
  • 3,368
  • 3
  • 36
  • 47

2 Answers2

104

You can add a path to a global or per-user ignore file in the [ui] section of your global/user hgrc or Mercurial.ini:

[ui]
ignore = ~/.hgignore

On Windows:

[ui]
ignore = %USERPROFILE%\.hgignore
Joel B Fant
  • 24,406
  • 4
  • 66
  • 67
2

In powershell, you can get to your global files like this.

PS> notepad $env:userprofile/mercurial.ini
...
[ui]
ignore = %USERPROFILE%\.hgignore
...

PS> notepad $env:userprofile/.hgignore
/bin/
/obj/
uffe hellum
  • 167
  • 1
  • 4