Tortoise - 是否可以在提交之前忽略新文件夹?

发布于 2024-09-10 00:36:34 字数 287 浏览 10 评论 0原文

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

然而,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 技术交流群。

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

发布评论

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

评论(3

时光无声 2024-09-17 00:36:34

这是因为你还没有添加它们的父目录。首先在新项目目录上“添加”,然后当它出现显示要添加的文件列表的对话框时,取消选中 binobj。添加项目目录后,您可以忽略它们。

您还可以将 binobj 添加到全局忽略列表(在 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 and obj. You can then ignore them once the project directory has been added.

You could also add bin and obj to your global ignore list (in the TortoiseSVN prefs) though that will ignore any instances of bin across all your projects.

≈。彩虹 2024-09-17 00:36:34

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

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

Set the svn:ignore property to "bin" and "obj" for the parent folder, provided the parent folder is under version control.

  • Right-click the parent folder in Explorer
  • Choose TortoiseSVN -> Properties
  • Choose the svn:ignore property from the "Property name" drop-down
  • Add "bin" and "obj" to the "Property value" field, separating them by line breaks.
  • Commit the parent folder only
  • The child folders should show up with a grey "ignored" icon from then on.
很酷又爱笑 2024-09-17 00:36:34

您可以添加到全局忽略模式中。

在 Tortoise 设置中的“常规”窗格上,有一个用于添加全局忽略模式的编辑字段。这些是启用通配符的,因此您可以添加所有临时文件,例如 *.ncb 等,也可以添加目录。

例如。这是我的全局忽略模式,您可以看到它设置为忽略许多文件类型,但也忽略几个目录。

*.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*

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