Adding files to .hgignore
will prevent them from being tracked. But we have some files that we want to be in the repository - we just don't want users to ever commit changes. Is there a way to ignore changes to these files, so they won't get committed in an hg commit
.
Asked
Active
Viewed 77 times
2

Martin Geisler
- 72,968
- 25
- 171
- 229

jhourback
- 4,381
- 4
- 26
- 31
-
possible duplicate of [Mercurial: How to ignore changes to a tracked file](http://stackoverflow.com/questions/2856571/mercurial-how-to-ignore-changes-to-a-tracked-file) – Martin Geisler Mar 29 '12 at 07:06
1 Answers
2
That cannot be done in Mercurial — a file is either tracked or untracked (and then optionally ignored). You should instead version a template file and then ignore the real file.
So add config.template
to version control and add config
to .hgignore
. Ask your developers to copy the template to the real name and customize it as needed.

Martin Geisler
- 72,968
- 25
- 171
- 229