Question

I've got a configuration file ("config") that we originally committed to our repository. (first mistake)

We then deleted that file using hg rm, and left a sample configuration file in the repository.

When developing, we just copy the "config.sample" file to "config". However, whenever I update to a different branch and back to the branch with the delete, the untracked config file is deleted.

I've already added the config file to .hgignore.

Is there a way to make mercurial allow the existence of this untracked file going forward?

Was it helpful?

Solution

It looks like the branch you go to before coming back contains a config file too. When updating back, the file was deleted, so mercurial removes it.

Try deleting the config file in your other branch, too, and adding the file in the .hgignore of that same branch.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top