Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SVN ignore not working

Tags:

svn

I'm trying to make subversion ignore a folder, so I did from the parent folder:

svn propset svn:ignore folder-to-ignore .

but the svn st is still listing the files within that folder with a "?" (not on version control).

I want to ignore the folder itself (which is on version control), as there are always new files inside it.

Any idea how to proceed?

like image 998
The Student Avatar asked Jul 01 '11 17:07

The Student


2 Answers

I have struggled with the same problem and learned that the the command must be run in the parent folder and that the ignored directory can not be a sub directory. Assume I have the following structure and wish to ignore virtualenv:

project/
project/.svn/
project/trunk/
project/trunk/virtualenv/

When in the project folder the following will not work as expected:

svn propset svn:ignore trunk/virtualenv .

However the following will work:

cd trunk
svn propset svn:ignore virtualenv .

OR

svn propset svn:ignore virtualenv trunk/

This is actually the expected behaviour, see http://svnbook.red-bean.com/en/1.1/ch07s02.html and search for ignore information.

Note: If the folder was already tracked you can untrack it with svn remove <FOLDER> --keep-local

like image 96
Daniel Sokolowski Avatar answered Oct 07 '22 17:10

Daniel Sokolowski


If the folder (or a file) is already in version control, it cannot be ignored. But you can ignore all files inside that folder — just set the svn:ignore property on that folder instead:

svn propset svn:ignore "*" folder-to-ignore

The folder itself will still be tracked (and created on a new checkout).

like image 39
Sergey Vlasov Avatar answered Oct 07 '22 19:10

Sergey Vlasov