Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to ignore directories/files in Subversion?

How to setup my Subversion so it ignores target files generated by Maven on Linux? I don't want to commit them into SVN.

How do I do this on Linux and Mac command line?

like image 417
techsjs2012 Avatar asked Jan 15 '13 20:01

techsjs2012


2 Answers

To ignore files in subversion you want to set the svn:ignore property. You can see more here http://svnbook.red-bean.com/en/1.8/svn.advanced.props.special.ignore.html about half way down.

To ignore the target folder from your project folder run

svn propset svn:ignore target .

Alternatively to edit a list of ignored files folders run

svn propedit svn:ignore .
like image 153
Adam Schreiner Avatar answered Oct 04 '22 01:10

Adam Schreiner


Before committing code to the Subversion repository we always set the svn:ignore property on the directory to prevent some files and directories to be checked in. We always exclude the IDE project files and the target/ directory. Instead of keeping all of the excludes in mind all the time it's useful to put them all in a file and reference the file with the -F option:

svn propset svn:ignore -F .svnignore .

Put this file in the project folder

.svnignore
target/*
like image 24
Roman C Avatar answered Oct 04 '22 02:10

Roman C