bazaar 可以忽略分支中已存在的文件吗?

发布于 2024-11-15 02:40:08 字数 203 浏览 6 评论 0原文

在我的本地计算机上,配置与测试和生产服务器不同。

每次当我想提交本地代码时,它都会注意到(Bazaar Explorer)我编辑了配置文件。现在,我在每次提交时都明确忽略该文件。然而,这种情况偶尔会出错。

使用分支或用户忽略并不能解决问题。该文件已经在后备箱中。

有人有一个好的策略、解决方法或者可能找到了正确的参数吗?

谢谢!

On my local machine the configurations are different from the test and production server.

Everytime when I want to commit my local code, it notices (Bazaar Explorer) that I edited the config file. Now I'm explicitly ignoring this file with every commit. However, this goes wrong once in a while.

Using branch or user ignores doesn't solve the problem. The file is already in the trunk.

Does somebody have a good strategy, workaround or perhaps found the right parameter for this.

Thanks!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

百变从容 2024-11-22 02:40:08

不要对实际的配置文件进行版本控制。如果您想对配置示例进行版本控制,请为其指定另一个名称。
所以做这样的事情:

bzr remove --keep conf.ini
bzr ignore conf.ini
cp conf.ini conf.sample.ini
<maybe edit the new sample to be generic>
bzr add conf.sample.ini
bzr ci -m "don't track the actual conf file any more"

Don't version-control the actual config file. If you want to version-control a config sample, give it another name.
So do something like this:

bzr remove --keep conf.ini
bzr ignore conf.ini
cp conf.ini conf.sample.ini
<maybe edit the new sample to be generic>
bzr add conf.sample.ini
bzr ci -m "don't track the actual conf file any more"
才能让你更想念 2024-11-22 02:40:08

您可以使用别名 bzr commit 来使用排除,例如:

alias bzrcom='bzr commit --exclude=/path/to/your/config'

You can alias bzr commit to use exclude like:

alias bzrcom='bzr commit --exclude=/path/to/your/config'

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文