Mercurial global ignore pattern (it’s awesome)
This is the global ignore pattern for Mercurial that we use at my workplace, i think it’s pretty awesome and i wanted to share it. It’s configured to work with users on Mac OS X and Windows, with projects in all versions of Visual Studio, Eclipse projects (even Flex app projects), as well as some other extra pesky files you wouldn’t want in your shared repository. I’m not saying this is THE pattern to rule them all, but it certainly covers enough to meet most developer’s needs. If you have any suggestions or gripes please let me know in the comments section.
So, no more talking, here’s the pattern:
syntax: glob *.o *.lo *.la #*# .*.rej *.rej .*~ *~ .#* .DS_Store *.suo *.user *.webinfo [Bb]in */[Bb]in [Oo]bj */[Oo]bj *.[Bb][Aa][Kk] *.~?? *[Tt][Mm][Pp] _vti_txt */_vti_txt _vti_script */_vti_script _vti_pvt */_vti_pvt _vti_cnf */_vti_cnf _private */_private .~* *.~* [Rr]elease */[Rr]elease [Dd]ebug */[Dd]ebug [Aa]nkh.[Ll]oad */_ReSharper* _ReSharper* *resharper* *.Cache *.StyleCop *.ReSharper obj/ bin/ *.ncb *.suo _ReSharper.* *.resharper.user .actionScriptProperties html-template/** .flexLibProperties .project .settings/**
Copy and paste that into a empty text file and save it as hgignore, .hgignore, flyingpuppy.awesome or whatever you want, to your user profile directory (in Windows “%USERPROFILE%\hgignore” and OS X “~/.hgignore”).
Then open up your .hgrc or mercurial.ini file and add:
ignore = ~/.hgignore
To the “[ui]” section. Save it, and done.