thomas
thomas

Reputation: 161

How do I remove a file from SVN's ignore list, using the command-line?

I'm running Linux, and I put some files into SVN's ignore list. Now I want to remove them. But, I need to use the command-line for this purpose, not some SVN client's built-in features. How can I do that?

Upvotes: 16

Views: 18358

Answers (4)

Andrey Nechaev
Andrey Nechaev

Reputation: 61

To remove ignored files from file system, run:

svn st --no-ignore | grep "I   " | sed "s/I   //" | xargs rm

Upvotes: 1

Nix
Nix

Reputation: 58522

Use the svn propdel command

Directory:

svn propdel svn:ignore .

Recursive:

svn propdel svn:ignore -R 

Upvotes: 12

Reuben Peter-Paul
Reuben Peter-Paul

Reputation: 1580

If you just want to remove one file out of several others from svn ignore, do as @virtualblackfox says to get to your svn:delete property in a text editor. If you see the actual file listed, e.g. (file2.txt):

file1.txt
file2.txt
file3.txt

Then simply remove it, e.g.:

file1.txt
file3.txt

But if you have a filter like *.txt, then you will need to create a black list.

Then 'svn stat' and you should see something like

?    file2.txt

Then you can 'svn add file2.txt' back in to the repository.

Upvotes: 1

Julien Roncaglia
Julien Roncaglia

Reputation: 17837

Using propedit start the default text editor to edit a property, in this case it's the one named svn:ignore :

svn propedit svn:ignore .

Upvotes: 14

Related Questions