have, but ignore, file?

Colin D Bennett colin at gibibit.com
Fri Jan 6 22:07:24 UTC 2012

On Fri, 06 Jan 2012 16:37:43 -0500
Kyle Nitzsche <kyle.nitzsche at canonical.com> wrote:

> Hi,
> I need to have a file in a branch that is changed by various
> build and merge processes. (ok, it is lots of files in lots of
> branches.)
> I don't want to keep those crufty changes, nor do I want to have
> to revert the file manually. I want them auto-ignored.
> Now and then, I want to intentionally change the file and keep
> that new version.
> So anyone who gets the branch gets the correct version, and all
> intermediate cruft is auto-ignored.
> So I want to have the file in bzr, but ignore until I say: commit
> this version.
> Supported?

The most common way to do this is to check in a “template file”
that users can copy and modify.  For instance, it might be called
project.config.template and and then users copy it to
project.config and modify that file.

If you don't _require_ customization for it to be useful, and if
you have control over the process using the file, you can have the
versioned 'project.config.template' file be used and let the
non-versioned and ignored 'project.config.local' file override it
if it exists.


More information about the bazaar mailing list