Sometimes you want to keep some files in your repository, but you don’t want to commit them into your version control system. That’s basically what .gitignore or .hgignore are for. Depending on the team size, this file can become polluted very fast with personal rules, like steve-testing/. It’s much cleaner to define user-specific ignore rules in a second ignore file, which is stored locally:

Git

1. Open {repo}/.git/config and add the following:

[core]
excludesfile = {repo}/.gitignore.local

Alternatively, run the following command in your git repository:

$ git config core.excludesfile .gitignore.local

2. Create {repo}/.gitignore.local and add ignore rules the same way as in .gitignore

Mercurial

1. Open {repo}/.hg/hgrc and add this:

[ui]
ignore.local = {repo}/.hgignore.local

Notice: you need to use an absolute path here.

2. Create {repo}/.hgignore.local and define ignore rules the same way as in .hgignore

The idea of using a .local suffix comes from StackOverflow.

SVN

Unfortunately, there is no real alternative for SVN. However, some SVN clients (e.g. TortoiseSVN) provide a workaround using the ignore-on-commit changelist to ignore files locally.