duplicate: Ignore SVN ignore... possible?
复制:忽略SVN忽略......可能吗?
Suppose my working copy is littered with unversioned files that I don't want to delete. I want svn to ignore these files, but I do not want to add them to the ignore list, because I don't want to pollute other people's working copy with my ignore list. Is this possible in svn?
假设我的工作副本中充斥着我不想删除的无版本文件。我希望svn忽略这些文件,但我不想将它们添加到忽略列表中,因为我不想用我的忽略列表污染其他人的工作副本。在svn中这可能吗?
Clarification: I'm not sure why, but people keep advising me to edit my global configs; however, this is not what I'm what I'm looking for. What I want to do is target specific files in a particular working copy. Is this even possible??
澄清:我不知道为什么,但人们一直建议我编辑我的全球配置;然而,这不是我正在寻找的东西。我想要做的是定位特定工作副本中的特定文件。这有可能吗?
3 个解决方案
#1
Yes, the user configuration file can contain the global-ignores
option which is exactly what you're looking for.
是的,用户配置文件可以包含global-ignores选项,这正是您正在寻找的选项。
The location of this file varies by platform. From the documentation:
此文件的位置因平台而异。从文档:
On Unix-like systems, this area appears as a directory named .subversion in the user's home directory. On Win32 systems, Subversion creates a folder named Subversion, typically inside the Application Data area of the user's profile directory (which, by the way, is usually a hidden directory). However, on this platform the exact location differs from system to system, and is dictated by the Windows registry.
在类Unix系统上,此区域在用户的主目录中显示为名为.subversion的目录。在Win32系统上,Subversion创建一个名为Subversion的文件夹,通常位于用户配置文件目录的Application Data区域内(顺便说一下,它通常是一个隐藏目录)。但是,在此平台上,确切位置因系统而异,并且由Windows注册表决定。
#2
If you are using TortoiseSVN, you can go in TortoiseSVN's settings (Right Click > TortoiseSVN > Settings).
如果您使用的是TortoiseSVN,您可以使用TortoiseSVN的设置(右键单击> TortoiseSVN>设置)。
In the General Tab, Subversion Group, add a lone asterisk (*
) to the Global Ignore Pattern option.
在“常规”选项卡“Subversion组”中,在“全局忽略模式”选项中添加一个单独的星号(*)。
#3
In your private subversion config file for the repository, set the global-ignores flag, like this:
在存储库的私有subversion配置文件中,设置global-ignores标志,如下所示:
[miscellany]
global-ignores = *.class *.o
#1
Yes, the user configuration file can contain the global-ignores
option which is exactly what you're looking for.
是的,用户配置文件可以包含global-ignores选项,这正是您正在寻找的选项。
The location of this file varies by platform. From the documentation:
此文件的位置因平台而异。从文档:
On Unix-like systems, this area appears as a directory named .subversion in the user's home directory. On Win32 systems, Subversion creates a folder named Subversion, typically inside the Application Data area of the user's profile directory (which, by the way, is usually a hidden directory). However, on this platform the exact location differs from system to system, and is dictated by the Windows registry.
在类Unix系统上,此区域在用户的主目录中显示为名为.subversion的目录。在Win32系统上,Subversion创建一个名为Subversion的文件夹,通常位于用户配置文件目录的Application Data区域内(顺便说一下,它通常是一个隐藏目录)。但是,在此平台上,确切位置因系统而异,并且由Windows注册表决定。
#2
If you are using TortoiseSVN, you can go in TortoiseSVN's settings (Right Click > TortoiseSVN > Settings).
如果您使用的是TortoiseSVN,您可以使用TortoiseSVN的设置(右键单击> TortoiseSVN>设置)。
In the General Tab, Subversion Group, add a lone asterisk (*
) to the Global Ignore Pattern option.
在“常规”选项卡“Subversion组”中,在“全局忽略模式”选项中添加一个单独的星号(*)。
#3
In your private subversion config file for the repository, set the global-ignores flag, like this:
在存储库的私有subversion配置文件中,设置global-ignores标志,如下所示:
[miscellany]
global-ignores = *.class *.o