Fix SWTBot test: Use ceiling directory
[egit.git] / org.eclipse.egit.doc / userguide / Adding-a-project-to-version-control.html
blobc50e220848b88a59b1535a0b020a6653d8bf54df
1 <?xml version='1.0' encoding='utf-8' ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2 <html xmlns="http://www.w3.org/1999/xhtml">
3 <head>
4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
5 <title>EGit User Guide - Adding a project to version control</title>
6 <link type="text/css" rel="stylesheet" href="book.css"/>
7 </head>
8 <body>
9 <table class="navigation" style="width: 100%;" border="0" summary="navigation">
10 <tr>
11 <th style="width: 100%" align="center" colspan="3">Adding a project to version control</th>
12 </tr>
13 <tr>
14 <td style="width: 20%" align="left">
15 <a href="EGit User Guide.html" title="Getting Started">
16 <img alt="Previous" border="0" src="images/prev.gif"/>
17 </a>
18 </td>
19 <td style="width: 60%" align="center"></td>
20 <td style="width: 20%" align="right">
21 <a href="Creating-a-new-empty-Git-Repository.html" title="Creating a new empty Git Repository">
22 <img alt="Next" border="0" src="images/next.gif"/>
23 </a>
24 </td>
25 </tr>
26 <tr>
27 <td style="width: 20%" align="left" valign="top">Getting Started</td>
28 <td style="width: 60%" align="center"></td>
29 <td style="width: 20%" align="right" valign="top">Creating a new empty Git Repository</td>
30 </tr>
31 </table><hr/>
32 <h1 id="Adding_a_project_to_version_control">Adding a project to version control</h1>
33 <p>Select the project node of the project to be added to version control</p>
34 <p>
35 <img border="0" src="images/01-CreateNewJavaProject.png"/>
36 </p>
37 <p>Execute "Team" -> "Share Project" on the project node</p>
38 <p>
39 <img border="0" src="images/02-TeamShareProject.png"/>
40 </p>
41 <p>Select repository type "Git" and click "Next"</p>
42 <p>
43 <img border="0" src="images/03-SelectRepositoryTypeGit.png"/>
44 </p>
45 <p>To configure the Git repository select the new Eclipse project HelloWorld</p>
46 <p>
47 <img border="0" src="images/04-SelectProjectToConfigureGitRepository.png"/>
48 </p>
49 <p>Click "Create" to initialize a new Git repository for the HelloWorld project. If your project already resides in the working tree of an exisiting GIT repository the repository is chosen automatically.</p>
50 <p>
51 <img border="0" src="images/05-CreateNewGitRepository.png"/>
52 </p>
53 <p>Click "Finish" to close the wizard.</p>
54 <p>The decorator text "
55 <a href="master">master</a>" behind the project shows that this project is tracked in a repository on the master branch
56 and the question mark decorators show that the ".classpath" and ".project" files are not yet under version control
57 </p>
58 <p>
59 <img border="0" src="images/06-NewGitRepository.png"/>
60 </p>
61 <p>Select "Team" -> "Add to version control" on the project node</p>
62 <p>
63 <img border="0" src="images/07-AddToVersionControl.png"/>
64 </p>
65 <p>The plus decorators show that now the ".classpath" and ".project" files are added to version control</p>
66 <p>
67 <img border="0" src="images/08-AddedToVersionControl.png"/>
68 </p>
69 <p>Create a file .gitignore in the project folder with the following content:</p>
70 <p>bin</p>
71 <p>This excludes the bin folder from GIT's list of untracked files. Add .gitignore to version control.</p><hr/>
72 <table class="navigation" style="width: 100%;" border="0" summary="navigation">
73 <tr>
74 <td style="width: 20%" align="left">
75 <a href="EGit User Guide.html" title="Getting Started">
76 <img alt="Previous" border="0" src="images/prev.gif"/>
77 </a>
78 </td>
79 <td style="width: 60%" align="center">
80 <a href="EGit User Guide.html" title="EGit User Guide">
81 <img alt="EGit User Guide" border="0" src="images/home.gif"/>
82 </a>
83 </td>
84 <td style="width: 20%" align="right">
85 <a href="Creating-a-new-empty-Git-Repository.html" title="Creating a new empty Git Repository">
86 <img alt="Next" border="0" src="images/next.gif"/>
87 </a>
88 </td>
89 </tr>
90 <tr>
91 <td style="width: 20%" align="left" valign="top">Getting Started</td>
92 <td style="width: 60%" align="center"></td>
93 <td style="width: 20%" align="right" valign="top">Creating a new empty Git Repository</td>
94 </tr>
95 </table>
96 </body>
97 </html>