Tortoise - 是否可以在提交之前忽略新文件夹?
我刚刚将一个类库项目添加到我的 .NET 解决方案中。当我构建它时,它创建了 bin
和 obj
文件夹,我想将其从版本控制中排除。
然而,Tortoise 不会让我忽略第一次提交之前的文件夹。它给出以下消息。
无法将 bin 添加到忽略列表!
我必须检查整个文件夹,然后为这两个文件夹选择删除并添加到忽略列表
。
我如何防止它们被签入,并确保乌龟知道忽略它们?
I just added a class library project to my .NET solution. When I built it, it created the bin
and obj
folders, which I want to exclude from version control.
However, Tortoise won't let me ignore the folders before the first commit. It gives the following message.
Cannot add bin to the ignore list!
I have to check the whole lot in, and then choose Delete and add to ignore list
for the two folders.
How do I prevent them being checked in at all, and ensure Tortoise knows to ignore them?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
这是因为你还没有添加它们的父目录。首先在新项目目录上“添加”,然后当它出现显示要添加的文件列表的对话框时,取消选中
bin
和obj
。添加项目目录后,您可以忽略它们。您还可以将
bin
和obj
添加到全局忽略列表(在 TortoiseSVN 首选项中),但这会忽略bin 的任何 实例
跨越您的所有项目。It's because you haven't yet added their parent directories. Do 'add' on the new project directory first, and then when it gives you the dialog showing the list of files to add, untick
bin
andobj
. You can then ignore them once the project directory has been added.You could also add
bin
andobj
to your global ignore list (in the TortoiseSVN prefs) though that will ignore any instances ofbin
across all your projects.将
svn:ignore
属性设置为父文件夹的“bin”和“obj”,假设父文件夹受版本控制。svn:ignore
属性Set the
svn:ignore
property to "bin" and "obj" for the parent folder, provided the parent folder is under version control.svn:ignore
property from the "Property name" drop-down您可以添加到全局忽略模式中。
在 Tortoise 设置中的“常规”窗格上,有一个用于添加全局忽略模式的编辑字段。这些是启用通配符的,因此您可以添加所有临时文件,例如 *.ncb 等,也可以添加目录。
例如。这是我的全局忽略模式,您可以看到它设置为忽略许多文件类型,但也忽略几个目录。
you can add to your global ignore pattern.
In Tortoise settings, on the General pane, there's a edit field to add global ignore patterns. These are wildcard-enabled so you can add all the temporary files, eg *.ncb etc, but also directories.
eg. here's my global ignore pattern, you can see it's set to ignore many file types but also a couple of directories.