Math-Linux.com

Knowledge base dedicated to Linux and applied mathematics.

Home > Linux > Tip of the day > SVN — How to ignore file or directory in subversion?

SVN — How to ignore file or directory in subversion?

All the versions of this article: [English] [français]

Ignore file

To ignore all files with the ending .o use:

svn propset svn:ignore "*.o" .

Ignore dir

If you want to ignore folder tmp

svn propset svn:ignore tmp .

Ignore multiple files/dirs

If you want to ignore tmp,obj,bin dirs and all files with *.o
*.lib,*.la
extension. Save this file

tmp
obj
bin
*.o
*.lib
*.la

and name it svnignore.txt, the following command will do the job !

svn propset svn:ignore -F svnignore.txt .

Ignore multiple files/dirs via command line

svn propedit svn:ignore .

This will bring up list of files or directories to ignore.

Find files that are not under version control

To find such files:

svn status | grep ^\? | awk '{print $2}'

Any message or comments?

comments powered by Disqus