Bazaar:忽略本地文件而不是集中存储库中的文件?
我们有一个集中的开发服务器,每个人都通过本地结账进行工作。我们如何才能仅忽略本地存储库中的特定目录,而不是集中存储库中的特定目录?
一些背景信息:该项目是一个 Drupal 站点,该站点的 files 目录始终在变化。由于我们不希望将本地 files 目录的任何更改提交到集中存储库,因此我们使用 .bzrignore 忽略该目录。问题是,这意味着集中式开发服务器上的 files 目录也将被忽略,这不是我们想要的。我们希望在更新/签出时获取其更改,但无法将我们自己的更改提交到 files 目录。
We have a centralized development server, with everyone working from local checkouts. How can we ignore a specific directory only in our local repositories and not in the centralized repository?
Some background information: The project is a Drupal site, and the files directory of this site is always in flux. As we don't want any changes to the local files directory to be committed to the centralized repo, we ignore this directory using .bzrignore. The problem is that this means the files directory on the centralized development server will also be ignored, which is not what we want. We want to get its changes when updating/checking out, but not be able to commit our own changes to the files directory.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
目前似乎无法直接执行这样的任务。但是,它已添加到 bzr 中的愿望清单问题跟踪器。
At the moment it seems not to be possible to perform such a task directly. It is, however, already added to the wishlist in bzr issue tracker.
现在您可以使用视图来隐藏它们。只需生成一个仅包含您要保留的文件的视图。
为了在我的 Mac OS X 机器上执行此操作,我运行了以下命令:
在删除视图之前,工作副本目录中不在 dir1 或 dir2 中的所有文件都将被忽略,如下所示:
For now you can use views to hide them. Just generate a view with just the files you want to keep.
To do this with on my Mac OS X machine I ran the following commands:
All the files in your working copy directory not in dir1 or dir2 will be ignored until you delete the view, like so:
对于全局使用,您可以在以下位置设置模式:
~/.bazaar/ignore
我有版本 Bazaar 2.5.1 并且它可以工作。
For global usage you can set pattern in:
~/.bazaar/ignore
I have version Bazaar 2.5.1 and it works.