Most of our project files were originally designed around Eclipse and the IntelliJ project files keep showing up when I do an SVN status. Not a huge deal...it is fairly easy to just ignore them. But I got tired of seeing them and couldn't remember how to make Subversion ignore them. Online info for dealing with Subversion is generally great, but everything I found on this process was a bit confusing so I wanted to put it all together here.
The initial problem was when issuing an svn status command, I would see extra entries for the project files, like this:
? myproject.iml
The question mark means that they are not designated to be included in version control. You can't just point to a single file and ask for it to be ignored, though...Subversion handles this differently. There is a property for each directory called svn:ignore, and this property needs to include the files or file patterns to be ignored. So in my main project directory, I issue the command
svn propedit svn:ignore .
(The dot is, as usual, the designation for the current directory and any directory can be substituted here.) This opens up an editor and allows me to enter as many lines as I want to designate things to ignore. I just add "*.iml" to the end of the file (I could add the actual file name if I wanted to, but this way is more generic) and save it and now the file stops appearing when I issue an svn status command.
No comments:
Post a Comment