Wednesday, April 21, 2010

SVN ignore files from command line OSX/Unix

You may need need to set an editor of choice before you can do this.

run the "export SVN_EDITOR=vim" on the command line or put the command in your .bash_profile or equivalent system file.

To actually ignore the "ignorable_file" in a directory do the following.

1. cd the_dir_that_contains_the_file_to_be_ignored
2. svn propedit svn:ignore . # opens vim in my case since this is my editor of choice. See above
3. add the filename of the file to be ignored (ignorable_file in this case) in the open svn properties file.
4. save the file and exit.
5. svn propget svn:ignore . # So you can see the properties
6. svn status --no-ignore # You should see an 'I' next to the ignored files
7. svn commit -m "comment goes here"

No comments:

Post a Comment