Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mercurial Prevent file from changing [duplicate]

Possible Duplicate:
Mercurial: How to ignore changes to a tracked file

I work on a team that uses Mercurial and we have a config file that is checked in and is stable.

Being that it's a config file, some team members need to make changes to it to have the software work on their machine but I want to prevent those changes from making it into the repository on checkin.

How can I do this?

I want the default config file to be in the repository and user made changes to be ignored on commit.

like image 225
Jeremy Edwards Avatar asked Dec 04 '25 14:12

Jeremy Edwards


1 Answers

The general pattern is to remove the config file from the repository and add it to .hgignore, and instead to provide a config.example file which users have to copy to config and customize. This copying can be done by the build script if you want to keep project set-up as simple as possible.

See also the links posted by kostja.

like image 117
Laurens Holst Avatar answered Dec 07 '25 15:12

Laurens Holst



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!