svn 中是否有全局忽略的概念? [英] Is there a concept of global ignores in svn?

查看:31
本文介绍了svn 中是否有全局忽略的概念?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法为 SVN 存储库或 PC 上的 SVN 客户端设置全局忽略列表?

Is there a way to setup a global list of Ignores for a SVN Repository or for the SVN Client on the PC?

我使用 Tortoise/Ankh/VisualSVN 等工具的唯一原因是我只想签入我需要的文件,而不需要所有 bin/obj/Resharper 内容.

The only reason I'm using tools like Tortoise/Ankh/VisualSVN is because I want to only check in the files I need without all the bin/obj/Resharper stuff.

我被 .gitignore.hgignore 宠坏了,我只是将它们复制到存储库然后使用 git commit -a 而无需关心检查垃圾.

I'm spoiled by .gitignore and .hgignore which I just copy to a repository and then use git commit -a without having to care about checking in junk.

我知道我可以手动设置它,但这样做很乏味,而且我认为它也必须应用于创建的每个新文件夹.

I know I can manually set it, but that's tedious to do and I think it had to be applied to every new folder that gets created as well.

在 Windows 下使用 SVN.

Using SVN under Windows.

推荐答案

在安装 Subversion 时,路径中有一个文件,例如以下之一:

On an install of Subversion, there is a file in a path such as one of the following:

  • Windows Vista/7/8/8.1/10:C:\Users\\AppData\Roaming\Subversion\config
  • Windows XP:c:\Documents and Settings\\.subversion\config
  • Unix(Linux 等)、macOS:$HOME/.subversion/config

包含 Subversion 的全局配置.在 [miscellany] 部分是一个 global-ignores 参数,您可以使用它来设置全局忽略的文件名模式.

that contains a global configuration for Subversion. In the [miscellany] section is a global-ignores parameter which you can use to set up globally ignored filename patterns.

Subversion 的运行时配置区部分本书提供了更多信息,包括如果需要,如何在注册表中设置此类全局配置参数.

The Runtime Configuration Area section of the Subversion book has more information, including how to set up such global configuration parameters in the registry if you need to.

[miscellany]
global-ignores = *.o *.so *.so.[0-9]* .DS_Store [Tt]humbs.db

或者如果您正处于使用 Git 的过渡阶段:

or perhaps if you are in a transition phase to using Git:

[miscellany]
global-ignores = .git

这篇关于svn 中是否有全局忽略的概念?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆