Saturday, February 8, 2014

Setting subversion ignore files for Eclipse project





Eclipse and other IDE has its configuration files that are kept together with the project. This configuration files and directory are hidden and has dot prefix at the root of project directory.
     .setting
     .classpath
     .project

Some framework like a Maven also generate output directory in the root of project directory.
     target

All this files or directories should not be committed in to subversion so that other developers in the team can use shared source without conflict configuration.

To configure subversion to ignore project configuration files , do the following steps

     $ cd project_directory
     $ svn propedit svn:ignore .

For Ubuntu linux this command bring nano editor for adding the list of file or directories, just add all files that need not to be committed with your source codes.

     .settings
     .classpath
     .project
     target
     bin

Save file and then commit this list.

     $ svn commit -m "update ignore list"

Delete ignored files from subversion repository so that source code are none of ignored files but it still remember which files are not need to be uploaded from developer's machine.

Delete eclipse project and pretend to be a new member of developer team. Just check out the code and import into Eclipse again. IDE support files of Eclipse are created but will not be uploaded when you commit the code.



No comments:

Post a Comment