Update egit help for 0.8.0 from wiki
[egit.git] / org.eclipse.egit.doc / help / EGit / User_Guide / Starting-from-existing-Git-Repositories.html
blob606db621de31c105aa5db0f27184b3f2f063940d
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 - Starting from existing Git Repositories</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">Starting from existing Git Repositories</th>
12 </tr>
13 <tr>
14 <td style="width: 20%" align="left">
15 <a href="Creating-Repositories.html" title="Creating Repositories">
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="Working-with-remote-Repositories.html" title="Working with remote Repositories">
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">Creating Repositories</td>
28 <td style="width: 60%" align="center"></td>
29 <td style="width: 20%" align="right" valign="top">Working with remote Repositories</td>
30 </tr>
31 </table><hr/>
32 <h1 id="Starting_from_existing_Git_Repositories">Starting from existing Git Repositories</h1>
33 <p>In order to work with the contents of a Git Repository in the Eclipse workbench, the files and folders contained in this repository must be imported in the form of projects. In principle, this import step can be done using the generic "New Project" or "Import..." wizards, since the working directory of a Git Repository is just a normal directory in the local file system. However, the newly created projects would still have to be shared manually with Git. The "Import Projects from Git" wizards integrates project import and sharing and also offers some extra convenience.</p>
34 <h2 id="Starting_the_import_wizard">Starting the import wizard</h2>
35 <p>The wizard is started using
37 <br/>
39 <b>Import &gt; Git &gt; Projects from Git</b>
41 <br/>
43 <img border="0" src="images/ImportProjectWizard.png"/>
44 </p>
45 <p>If you started in a clean workspace, the first page will display an empty list:</p>
46 <p>
47 <img border="0" src="images/ImportProjectEmptyList.png"/>
48 </p>
49 <p>Before you can continue, you need to add one or several Git Repositories to the list.</p>
50 <p>If you have already Repositories in the list, the following step is optional.</p>
51 <h2 id="Cloning_or_adding_Repositories">Cloning or adding Repositories</h2>
52 <p>There are two ways to add Git Repositories to the list:</p>
53 <ol>
54 <li>Clone a remote Repository</li>
55 <li>Add an existing Repository from your local file system</li>
56 </ol>
57 <h3 id="Cloning_a_Repository">Cloning a Repository</h3>
58 <p>The first option is used if you start with a remote repository. The clone operation will copy that Repository to your local file system. The Clone wizard is started using the
59 <b>Clone...</b> button next to the Repository list. The Clone wizard is described in more detail elsewhere. Upon successful completion of the clone wizard, the newly cloned Repository should appear in the list automatically.
60 </p>
61 <h3 id="Adding_a_Repository">Adding a Repository</h3>
62 <p>The second option is useful if you already have a repository in your local file system, for example because you have cloned it earlier, you created it from scratch or you copied it from somewhere else. Clicking on the
63 <b>Add...</b> button next to the Repository list, a dialog is displayed which allows to enter a directory in the local file system. Press
64 <b>Search</b> to trigger a scan for Git repositories contained in this directory. If Git repositories are found, they will be shown in a list and you can select repositories to add:
65 </p>
66 <p>
67 <img border="0" src="images/ImportProjectAddDialog.png"/>
68 </p>
69 <p>After successful completion, the repository list should contain some repositories:</p>
70 <p>
71 <img border="0" src="images/ImportProjectFilledList.png"/>
72 </p>
73 <h2 id="Selecting_a_Repository_from_the_List">Selecting a Repository from the List</h2>
74 <p>You can now select a Repository and click
75 <b>Next</b>. On the following wizard page, you will have to decide:
76 </p>
77 <ul>
78 <li>How to do the import</li>
79 <li>How to share the imported projects:</li>
80 <li>(Optional): limit the scope of the wizard</li>
81 </ul>
82 <p>
83 <img border="0" src="images/ImportProjectSelectWizard.png"/>
84 </p>
85 <h2 id="Method_for_importing_Projects">Method for importing Projects</h2>
86 <h3 id="Import_Existing_Projects">Import Existing Projects</h3>
87 <p>If this radio button is selected, the wizard will scan the local file system for <tt>.project</tt> files and display the projects found for being imported. This is the most comfortable solution and should be used if <tt>.project</tt> files are checked into the Repository.</p>
88 <h4 id="Limiting_the_Scope_for_Project_Import">Limiting the Scope for Project Import</h4>
89 <p>In this case, the directory tree at the bottom is active. You can limit the search for <tt>.project</tt> files by selecting a folder in this tree, otherwise the complete working directory of the Repository will be scanned. On the next page, a list of the found projects (if any) will be shown. This is very similar to the generic
90 <b>Import Existing Projects</b> wizard, but has some additional filtering capabilities:
91 </p>
92 <p>
93 <img border="0" src="images/ImportProjectProjectList.png"/>
94 </p>
95 <h3 id="Use_the_New_Projects_Wizard">Use the New Projects Wizard</h3>
96 <p>When this option is chosen, this wizard branches to the generic "New Project" wizard. After completion of the "New Project" wizard, this wizard will resume and help you with sharing the newly created projects (if any) created using the "New Project" wizard.</p>
97 <p>In this case, the directory tree at the bottom is inactive, as the selection is not relevant for the "New Project" wizard.</p>
98 <h3 id="Import_as_General_Project">Import as General Project</h3>
99 <p>This option can be helpful when there are neither <tt>.project</tt> files available nor a suitable "New Project" wizard applies to the content of the Git Repository. If chosen, the wizard will generate a <tt>.project</tt> file and point the project to a folder of the Repository's working directory. The result is a "General Project".</p>
100 <p>By default, the newly generated project will point to the working directory of the Repository. By selecting some folder from the directory tree at the bottom, you can have the project generated for that folder.</p>
101 <p>When clicking
102 <b>Next</b> you will see a simple dialog suggesting a name and a directory for the new project:
103 </p>
105 <img border="0" src="images/ImportProjectNewGeneralProject.png"/>
106 </p>
107 <p>The name will be suggested to be the same as the name of the directory.</p>
108 <h2 id="Method_for_Sharing_Imported_Projects">Method for Sharing Imported Projects</h2>
109 <p>The newly created projects (if any) must be shared with the correct Git Repository in order to become part of the Git Team Provider. The following options for doing this share are provided:</p>
110 <h3 id="Try_to_Share_Newly_Created_Projects_Automatically">Try to Share Newly Created Projects Automatically</h3>
111 <p>This is the recommended option: the wizard will automatically detect newly created projects and find the corresponding Repository automatically. No user interaction is required. If automatic sharing fails, the projects will simply remain unshared. You can share them any time manually.</p>
112 <h3 id="Share_New_Projects_Interactively">Share New Projects Interactively</h3>
113 <p>This might be useful for very special circumstances where the automatic detection fails. Note that this will block the UI until project import is completed.</p>
114 <p>A page will be shown with the newly created projects and the corresponding Repositories. Using the check boxes, you can decide which projects to share:</p>
116 <img border="0" src="images/ImportProjectShareProject.png"/>
117 </p>
118 <h3 id="Do_Not_Share_New_Projects">Do Not Share New Projects</h3>
119 <p>This may be helpful if you want to share projects manually for some reason.</p><hr/>
120 <table class="navigation" style="width: 100%;" border="0" summary="navigation">
121 <tr>
122 <td style="width: 20%" align="left">
123 <a href="Creating-Repositories.html" title="Creating Repositories">
124 <img alt="Previous" border="0" src="../../images/prev.gif"/>
125 </a>
126 </td>
127 <td style="width: 60%" align="center">
128 <a href="User-Guide.html" title="EGit User Guide">
129 <img alt="EGit User Guide" border="0" src="../../images/home.gif"/>
130 </a>
131 </td>
132 <td style="width: 20%" align="right">
133 <a href="Working-with-remote-Repositories.html" title="Working with remote Repositories">
134 <img alt="Next" border="0" src="../../images/next.gif"/>
135 </a>
136 </td>
137 </tr>
138 <tr>
139 <td style="width: 20%" align="left" valign="top">Creating Repositories</td>
140 <td style="width: 60%" align="center"></td>
141 <td style="width: 20%" align="right" valign="top">Working with remote Repositories</td>
142 </tr>
143 </table>
144 </body>
145 </html>