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">
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"/>
9 <table class=
"navigation" style=
"width: 100%;" border=
"0" summary=
"navigation">
11 <th style=
"width: 100%" align=
"center" colspan=
"3">Adding a project to version control
</th>
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"/>
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"/>
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>
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>
35 <img border=
"0" src=
"images/01-CreateNewJavaProject.png"/>
37 <p>Execute
"Team" -
> "Share Project" on the project node
</p>
39 <img border=
"0" src=
"images/02-TeamShareProject.png"/>
41 <p>Select repository type
"Git" and click
"Next"</p>
43 <img border=
"0" src=
"images/03-SelectRepositoryTypeGit.png"/>
45 <p>To configure the Git repository select the new Eclipse project HelloWorld
</p>
47 <img border=
"0" src=
"images/04-SelectProjectToConfigureGitRepository.png"/>
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>
51 <img border=
"0" src=
"images/05-CreateNewGitRepository.png"/>
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
59 <img border=
"0" src=
"images/06-NewGitRepository.png"/>
61 <p>Select
"Team" -
> "Add to version control" on the project node
</p>
63 <img border=
"0" src=
"images/07-AddToVersionControl.png"/>
65 <p>The plus decorators show that now the
".classpath" and
".project" files are added to version control
</p>
67 <img border=
"0" src=
"images/08-AddedToVersionControl.png"/>
69 <p>Create a file .gitignore in the project folder with the following content:
</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">
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"/>
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"/>
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"/>
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>