0

I have a remote repository for my project. I have cloned it to my local machine. I have to change two settings file to make this project run in my local machine. How can I make mercurial to ignore the changes in these two files in my local machine, so that the settings file in the online version will not get updated with the local settings file when I push the changes to the remote server.

0

2 Answers 2

1

Mercurial (and no one does) doesn't provide such facilities.

You need to exclude those files completely and store templates or file.config.sample files in repository so that each developer sets up theirs own personal config file manually or using some build script.

0

You can have other ignore files besides the .hgignore in the working directory. Add this to your hgrc:

[ui]
ignore = /path/to/repo/.hg/hgignore

Create the hgignore file inside the .hg folder and edit it with the files you want to ignore. It's like an extension of the .hgignore, but only for your local copy.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.