开发者

Mercurial: Globally Ignore Files

开发者 https://www.devze.com 2023-03-19 10:26 出处:网络
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.

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 $H开发者_高级运维OME path (I tried that already but maybe I did something wrong).


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


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/
0

精彩评论

暂无评论...
验证码 换一张
取 消