24
votes

I have a large project on a live server which I would like to commit to an svn repo. I have added all files and directories to the repository using svn add.

The problem is that there is a folder-structure that I want to commit but without its content. The folder name is:

/home/myproject/media/

It contains various folders such as images, adverts news, home-images, etc. I would like to commit these folders but not their content. I have tried doing the following:

cd /home/myproject/media/
svn propedit svn:ignore ./homeimages/
{{The text editor comes up}}
I entered * and saved

but when I do

svn stat

the files under homeimages are still listed in the repository. How can I resolve this issue?

3

3 Answers

18
votes

Once added to subversion, the svn:ignore property no longer applies. You will first have to do an svn remove on the contents of your media folder. Once that is done, SVN should ignore the files as you requested.

1
votes

I use SVN client (Tortoise SVN) and it has ignore-on-commit functionality. Try use that.

0
votes

You can revert adding files and leave only folders added.

svn revert --depth files

You will have to do it in every subfolder of /home/myproject/media/.