I have seen samples for Mercurial ignore files for Visual Studio, amongst others.
I've just started playing around with Android development, and I also use this time to experimenting with Mercurial. So my question is: does anyone have a good example of a .hgignore
file to use for Eclipse and Android development?
For starters I've got the following myself:
# use glob syntax
syntax: glob
# Ignore patterns
.metadata\
bin\
gen\
Are there any other ignore patterns that should be included? Should for instance the Eclipse files .classpath
and .project
be omitted from version control as well?
-- Edit below --
I haven't quite gotten the answers I hoped for yet, so I'll put out a bounty and try to specify a bit clearer what I'm looking for.
After experimenting a bit myself, I seem to have found that the suggested .hgignore
listed above seems to be sufficient. The only addition I've made, is one line with .settings
(this was a folder that appeared after I ran Android Tools -> Fix Project Properties). I've also found that (as mentioned by Ry4an) that the Eclipse files .classpath
and .project
should not be excluded.
I am however uncertain that this small ignore file will be sufficient when I get to projects a bit bigger than the basic tutorials (if it actually is all good, please explain why, and you'll get the credit). So to summarize what I'm looking for:
- I want a concrete example for a
.hgignore
file for an Android project under Eclipse - The ignore file should be so that whenever I check out a copy of the repository at a new location, it should work straight away (i.e. without having to mess with paths and references, add missing files etc.)
- Please also explain why your include file looks like it does (I want to understand why certain files/directories are excluded (and why some definitely should be included))
- If you include OS specific excludes, please also state so (I'm running on Windows 7 btw.)
.settings
directory. If you're finding that the Android plug in is including things that are specific to your environment (e.g., hard coded paths) in some files within, then ignore those files individually. I also prefer not to create a repository off of my workspace, and so I don't typically have.metadata
in my ignore list (this gives me the flexibility to import projects from multiple repositories, though I'm not sure how important that is to you). – Neuroglia