Tawani
Tawani

Reputation: 11198

Ankhsvn - do not commit config files

In ankhsvn how do I prevent a certain version file (e.g.connectionStrings.config) from being committed

Upvotes: 0

Views: 1398

Answers (2)

si618
si618

Reputation: 16848

Whilst Sander is correct, if you're working with other developers or use a build server, then I'd recommend you create a connectionStrings.default.config which is version controlled. Then as part of a BeforeBuild target in your project file, copy to connectionStrings.config if it doesn't exist.

That way other developers can see when the default configuration changes through the SVN log when they update working copies. If you use a build server, it can can be configured to always create a clean configuration based on the default, which is useful for setting up test environments and ensuring config changes are respected.

FWIW, what I do with CruiseControl.NET is pass a MSBuild property which identifies this as a build server build, then as part of BeforeBuild target it deletes any existing configuration files before creating new ones based on the defaults.

Upvotes: 2

Sander Rijken
Sander Rijken

Reputation: 21615

If the file is a new file, use right click -> Subversion -> Ignore, and choose an appropriate option.

If it's an existing file right click -> Subversion -> Move To Change List -> ignore-on-commit. This prevents the file from being automatically selected, but you can still commit it by right-clicking or selecting it explicitly.

Upvotes: 3

Related Questions