tags:

views:

64

answers:

2

I know it's a basic question but I've tried every combination of propedit propset, etc.

In an existing project, there's a file (let's call it 'error.log) I want to ignore for all future commits. What's the command-line syntax to do so?

+5  A: 

First you must ensure the file is not already in your repository.

If it is, you need to delete it from the repository and commit that change before you move on.

Then it is as simple as adding the property:

svn propset svn:ignore . "..."

If you've already ignored other files, you must set the property to contain the old list + error.log, otherwise you can just do:

svn propset svn:ignore . "error.log"

Then you commit that so that other working copies will get the same property and you should be all set.

Also, if you're on Windows, and using [TortoiseSVN][1], it's as simple as doing this:

  1. Right-click the folder and select Commit
  2. In the list, the error.log file should be listed without a checkmark
  3. Right-click the file, select Ignore, and add it as a single item (not *.log) to the ignore list
  4. Commit

Note again, you must ensure the file is not in your repository when you do this, so if it is, delete it before you add the ignore setting.

Lasse V. Karlsen
Excellent explanation.
Gary.Ray
Thanks, this almost worked...So I svn deleted the log directory. Committed it. And then this worked:svn propset svn:ignore . "log"But a file inside that directory still shows up as status '?' after committing the ignore. Also, I get this error when doing other directories: svn propset svn:ignore . 'another_dir'warning: 'another_dir' is not under version control
Zando
+1  A: 

Go to the directory of the error-log file and type

svn propedit svn:ignore .

An editor will open and you need to add a line with the file name error.log. Save and exit the editor. Commit the changes.

Arne Burmeister