Mercurial ignore file for Umbraco
Mercurial allows you to list which files you want it to ignore (the ones that should not be in source control). Here is the one we use for our Umbraco sites.
Update: We've now moved this to BitBucket so others can fork it/add to it/etc.
Or you can install it as a nuget package:
I'm hoping to get this in to a source control site so others can add to it but for now here is the ignore file we use in house.
# Offroadcode's Mercurial Ignore file
# visit /blog/2012/4/5/mercurial-ignore-file-for-umbraco/ for updates/additions
##### File globs to match ####
# Data folders/files
# Dll's and related C# crud
# Misc crud
# For safety's sake
###### Regular Expression matches #####
# None yet!
Save the above into a file called ".hgignore" in the root of your project and HG will do the rest. Tip: you can't create files that begin with a leading dot via the UI, you will probably have to use the command line or a text editor.
We will add to this as we go a long but try to keep it generic. If you have any rules you like to add in please let us know via the comments and I'll update.
Currently it handles Resharper files (there are 100's of these!), data files which Umbraco generates and ImageGen Cache folders etc.
One that might surprise you is that we ignore the web.config file. We find it best to check this in as web.config.dev or web.config.live to avoid the wrong one ever going live. It does mean you have to remember to copy/rename the right one when you first check out (or have it in a build script if thats your bag) but better that then accidently goosing a live site!
Any thoughts or additions let me know.
blog comments powered by