How to set up svn ignore in command line


Often I ran into this, so here are the steps to set up the ignore files in command line or in a shell.

svn add *
svn revert myfolder
svn revert --depth infinity myfolder
export SVN_EDITOR=nano
svn propedit svn:ignore . // this will bring up editor, add the file names to be ignored.

When adding new xcode project into svn repository: Let’s say the project name is “helloapple” and user name is “myuser”.

cd helloapple
svn add *
svn revert --depth infinity ./build
svn revert helloapple.xcodeproj/mysuer.mode*
svn revert helloapple.xcodeproj/myuser.pbxuser
svn revert helloapple.xcodeproj/myuser.perspectivev3
export SVN_EDITOR=nano
svn propedit svn:ignore .

When editor opens up, add these lines

build
helloapple.xcodeproj/mysuer.mode*
helloapple.xcodeproj/myuser.pbxuser
helloapple.xcodeproj/myuser.perspectivev3

And finally, commit the changes

svn ci -m "refs #1000, modified the svn ignore pattern"