AAU It Services

Ignore

Ignoring files

SVN's capability to ignore files is mostly a convenience feature, but can also save you from mistakenly adding unneeded files to the repository. This could be temporary build files, configuration files with database credentials or maybe just quick personal notes.

To prevent files from being committed you can use the ignore command as follows

svn propset svn:ignore "PATTERN" FOLDER (-R)

PATTERN is the pattern of the files you wish to ignore, e.g., *.log if you wanted to ignore log files.

FOLDER is the folder in which to ignore the files. This is . for the entire repository.

(-R) is an optional argument which determines whether the ignores should be set recursively for all subfolders.

An example of a command which would ignore all log-files in the entire repository is given below

svn propset svn:ignore "*.log" . -R

You can optionally invoke the command without "PATTERN", and Subversion will open a default text editor where you can set all ignore properties for a directory at once.