How to have a global hgignore for Mercurial

The hgignore file can be used to help Mercurial in deciding which files to ignore. If you find yourself repeating the same file patterns in the hgignore files of your Mercurial repositories, then you might want to create a global hgignore file.

First, create a .hgignore file in your home directory. Fill it up with patterns just like you did for your repository’s hgignore.

Next, add this entry to your global Mercurial configuration file:

ignore = ~/.hgignore

Tried with: Mercurial 2.0.2 and Ubuntu 12.04 LTS

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s