reset password

1. Import

In Eclipse, start a project and create the necessary folders and files. For our example, we created a Java project hello with an empty class HelloWorld under the /src folder, as shown in Figure 1.1.

[Project Before Import]

Figure 1.1 Project Before Import

To import this project, do the following

  • Right click on the project name then select Team -> Share Project....
  • Choose SVN as the repository type.
  • Create or select the repository location. In our example, the URL for the repository location is svn://cs3.calstatela.edu/hello.
  • Choose Use specified folder name and enter trunk.
  • Click Next then Finish.

After you complete these steps, Eclipse will switch to the Team Synchronizing Perspective. In this perspective, click on the button Commit All Outgoing Changes ... [Commit All Outgoing Changes], which will open up the Commit screen, as shown in Figure 1.2.

[Commit Window]

Figure 1.2 Commit Screen

In the Commit screen you will notice that in addition to the project files and folders, by default the Eclipse-generated files and folders such as .classpath, .project, and .settings are also selected for commit. Version controlling these files and folders provides little benefit and often causes problems on different platforms, so please uncheck them before commit. After the project is committed, switch to the SVN Repository Exploring Perspective, and you will see the repository structure shown in Figure 1.3.

[Repository After Import]

Figure 1.3 Repository After Import

Now you can create two branches, one for Student A and one for Student B. Figure 1.4 shows the repository structure after the branches are created.

[Repository After Branching]

Figure 1.4 Repository After Branching

A screen capture video illustrating the import process is available here.

This page has been viewed 3681 times.