svn ignore

May 2, 2011 at 10:35 PM

Is there some ignore file like .gitignore in svn?

I run svn command line on my linux computer. gen and bin directories are really unnecessary to track.

May 3, 2011 at 11:30 AM

Yep, it's called the svn:ignore attribute, which currently contains the following in our code tree: *.bak *.db *.pdb *.resharper *.resharperoptions *.scc *.snk *.suo *.user *.vspscc *.vsssccc */_ReSharper* */_ReSharper.* */bin* */obj *_ReSharper* bin obj */bin/* *bin/* *.suo */.metadata gen */gen/* *gen/*

It's a mash of several inputs from around the web, maybe there's something wrong in one of the patterns. More likely, however, it's because some patterns (gen) was applied after the code was checked in, and then you have to explicitly remove the files to have them excluded (svn continues to track files that are check ind, if i'm not remembering incorrectly).

May 5, 2011 at 8:03 PM

Is this file (svn:ignore) tracked too? Because when I write svn status it says all the gen directory is untracked.  Or have we to create this file on every working copy?

May 7, 2011 at 9:59 AM

svn:ignore is an attribute set on the folders/files (in my case done through Tortoise). Sebastian and I were actually talking about this yesterday, and I personally don't have a problem with having a gitignore file in our code tree to support working through git.

So if you want you're welcome to put a gitignore file in with the same patterns as above... 

May 8, 2011 at 8:12 AM

i am working with svn actually.


Here is how to exclude files locally in command line.


But .gitignore is good to have....


Actually we can just copy this file: