tags:

views:

407

answers:

3

duplicate: http://stackoverflow.com/questions/52398/ignore-svn-ignore-possible


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?

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  A: 

Yes, the user configuration file can contain the global-ignores option which is exactly what you're looking for.

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.

Greg Hewgill
Does this apply to all my working copies? What if I only want the ignores to apply to one?
allyourcode
then you need to use the property svn:ignore
Peter Parker
Peter, don't I have to commit svn:ignore? I don't want the ignore to get pushed to the repo, where my teammates will pull down the svn:ignore's that I set.
allyourcode
You don't *have* to commit the svn:ignore property, that is you could set it on your working copy and never actually commit it. This will be awkward to manage, however.
Greg Hewgill
Greg, yes it would. It kind if defeats the purpose, since I'd then have to ignore the svn:ignore property.
allyourcode
A: 

In your private subversion config file for the repository, set the global-ignores flag, like this:

[miscellany]
global-ignores = *.class *.o
Christopher
Where is this file?
allyourcode
on Windows (2000/XP) this file can be fond under %APPDATA%\Subversion\config
Peter Parker
or in the registry: HKEY_LOCAL_MACHINE\Software\Tigris.org\Subversion\Config\Miscellany\global-ignores
gbjbaanb
Seems like those configs apply to all working copies on my system. I want to set ignores on a specific working copy.
allyourcode
A: 

If you are using TortoiseSVN, you can go in TortoiseSVN's settings (Right Click > TortoiseSVN > Settings).

In the General Tab, Subversion Group, add a lone asterisk (*) to the Global Ignore Pattern option.

Andrew Moore