Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to svn ignore a file already added to the repository?

Tags:

svn

how can I ignore a file already added to a svn repository?

I like to exclude the file config.php:

$ svn st
M      .
M       config.php
M       adminfunctions.php

So, I use:

$ svn propedit svn:ignore .

And added config.php to the list.

Then, if I do another svn st, I get the same of the first time:

$ svn st
    M      .
    M       config.php
    M       adminfunctions.php

Wouldn´t the config.php be excluded just now?

Thanks in advance!

like image 812
Tom-As Avatar asked Feb 12 '11 13:02

Tom-As


Video Answer


1 Answers

svn:ignore only affects files that have not been added yet.

So in your case you have to delete the files from repository with svn del — don't forget to copy them temporarily to another location). After you copy the files back into the original directory svn will not mark them as new (and try to add them).

EDIT: Alternatively, as commented by @Blake, you can use --keep-local option when you do a svn del instead of copying files to another location.

like image 166
zerkms Avatar answered Nov 09 '22 02:11

zerkms