23

我刚刚在我的 .NET 解决方案中添加了一个类库项目。当我构建它时,它创建了binandobj文件夹,我想从版本控制中排除这些文件夹。

但是,Tortoise 不会让我在第一次提交之前忽略这些文件夹。它给出以下消息。

无法将 bin 添加到忽略列表!

我必须检查全部内容,然后选择Delete and add to ignore list这两个文件夹。

我如何完全防止它们被签入,并确保乌龟知道忽略它们?

4

3 回答 3

42

这是因为您还没有添加他们的父目录。首先在新项目目录上“添加”,然后当它为您提供显示要添加的文件列表的对话框时,取消勾选binobj. 一旦添加了项目目录,您就可以忽略它们。

您也可以添加binobj到您的全局忽略列表(在 TortoiseSVN 首选项中),尽管这将忽略所有项目中的任何实例。bin

于 2010-07-15T16:07:29.353 回答
9

将父文件夹的属性svn:ignore设置为“bin”和“obj” ,前提是父文件夹受版本控制

  • 在资源管理器中右键单击父文件夹
  • 选择 TortoiseSVN -> 属性
  • svn:ignore从“属性名称”下拉列表中选择属性
  • 将“bin”和“obj”添加到“属性值”字段,用换行符分隔它们。
  • 提交父文件夹
  • 从那时起,子文件夹应显示为灰色的“已忽略”图标。
于 2010-07-15T16:05:35.083 回答
3

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.

*.dep *.aps *.vbw *.suo *.obj *.ncb *.plg *.bsc *.ilk *.exp *.sbr *.opt *.pdb *.idb *.pch *.res *.scc *.vspscc *\bin\Release *\Debug *\obj *.user BuildLog.htm *.cache *.log *.dep *.intermediate.manifest *ReSharper*
于 2010-07-15T16:24:28.067 回答