<?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">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>EGit User Guide - Tasks</title>
<link type="text/css" rel="stylesheet" href="../../book.css"/>
</head>
<body>
<table class="navigation" style="width: 100%;" border="0" summary="navigation">
<tr>
<th style="width: 100%" align="center" colspan="3">Tasks</th>
</tr>
<tr>
<td style="width: 20%" align="left">
<a href="Concepts.html" title="Concepts">
<img alt="Previous" border="0" src="../../images/prev.gif"/>
</a>
</td>
<td style="width: 60%" align="center"></td>
<td style="width: 20%" align="right">
<a href="Reference.html" title="Reference">
<img alt="Next" border="0" src="../../images/next.gif"/>
</a>
</td>
</tr>
<tr>
<td style="width: 20%" align="left" valign="top">Concepts</td>
<td style="width: 60%" align="center"></td>
<td style="width: 20%" align="right" valign="top">Reference</td>
</tr>
</table><hr/>
<h1 id="Tasks">Tasks</h1>
<h2 id="Creating_Repositories">Creating Repositories</h2>
<h3 id="Considerations_for_Git_Repositories_to_be_used_in_Eclipse">Considerations for Git Repositories to be used in Eclipse</h3>
<h4 id="The_short_story">The short story</h4>
<p>When setting up Git Repositories with EGit, there are two recommendations for the creation of "productive" (as opposed for "playground") Repositories:</p>
<ul>
<li>Don't create the Repository within the Eclipse workspace
<ul>
<li>Be careful when cloning or creating a Repository</li>
<li>Make sure to use the Git Sharing Wizard correctly</li>
</ul>
</li>
<li>Don't create a Repository with an Eclipse project as root
<ul>
<li>Make sure to use the Git Sharing Wizard correctly</li>
</ul>
</li>
</ul>
<p>The first one happens when you specify a workspace folder during cloning or creation of a Repository.</p>
<p>Both of the above will happen when you use the Git Sharing Wizard from an Eclipse project that you have created manually in your workspace without taking precautions (the wizard has been fixed in the latest version).</p>
<p>Below you will find some motivation for these recommendations.</p>
<h4 id="The_longer_story">The longer story</h4>
<h5 id="Eclipse_Workspace_and_Repository_working_directory">Eclipse Workspace and Repository working directory</h5>
<p>Git Repositories can be created in different ways, for example by cloning from an existing Repository, by creating one from scratch, or by using the EGit Sharing wizard.</p>
<p>In any case (unless you create a "bare" Repository, but that's not discussed here), the new Repository is essentially a folder on the local hard disk which contains the "working directory" and the metadata folder. The metadata folder is a dedicated child folder named ".git" and often referred to as ".git-folder". It contains the actual repository (i.e. the Commits, the References, the logs and such).</p>
<p>The metadata folder is totally transparent to the Git client, while the working directory is used to expose the currently checked out Repository content as files for tools and editors.</p>
<p>Typically, if these files are to be used in Eclipse, they must be imported into the Eclipse workspace in one way or another. In order to do so, the easiest way would be to check in .project files from which the "Import Existing Projects" wizard can create the projects easily. Thus in most cases, the structure of a Repository containing Eclipse projects would look similar to something like this:</p>
<p>
<img border="0" src="images/EGit-0.12-SetupRepo-RepoStructureTwoProjects.jpg"/>
</p>
<h5 id="Implications">Implications</h5>
<p>The above has the following implications:</p>
<ul>
<li>It is probably not a good idea to make a project the root folder of your Repository</li>
</ul>
<dl>
<dd>The reason is that you will never be able to add another project to this Repository, as the .project file will occupy the root folder; you could still add projects as sub-folders, but this kind of project nesting is known to cause lots of problems all over the place. In order to add another project, you would have to move the project to a sub-folder in the Repository and add the second project as another sub-folder before you could commit this change.</dd>
</dl>
<ul>
<li>It is a good idea to keep your Repository outside of your Eclipse Workspace</li>
</ul>
<dl>
<dd>There are several reasons for this:</dd>
</dl>
<dl>
<dd>The new Repository will consider the complete folder structure of the Eclipse workspace as (potential) content. This can result in performance issues, for example when calculating the changes before committing (which will scan the complete .metadata folder, for example); more often than not, the workspace will contain dead folders (e.g. deleted projects) which semantically are not relevant for EGit but can not be excluded easily.</dd>
</dl>
<dl>
<dd>The metadata (.git-) folder will be a child of the Eclipse Workspace. It is unclear whether this might cause unwanted folder traversals by Eclipse.</dd>
</dl>
<dl>
<dd>You can easily destroy your Repository by destroying your Eclipse Workspace</dd>
</dl>
<h3 id="Creating_a_new_empty_Git_Repository">Creating a new empty Git Repository</h3>
<p>You can create a project first and share it afterwards. The Share Project Wizard supports creation of Git repositories (see
<a href="http://wiki.eclipse.org/EGit/User_Guide/Sharing#Adding_a_project_to_version_control" title="EGit/User Guide/Sharing#Adding_a_project_to_version_control" target="egit_external">Adding a project to version control</a>).
</p>
<p>You can also create a new empty Git Repository from the Git Repositories View (see
<a href="Creating_a_Repository" title="EGit/User_Guide#Creating_a_Repository">Creating a Repository</a>).
</p>
<h3 id="Creating_a_Git_Repository_for_multiple_Projects">Creating a Git Repository for multiple Projects</h3>
<p>You may first create multiple projects under a common directory and then create a common repository for all projects in one go:</p>
<ul>
<li>create the Eclipse projects e.g. a, b, c under a common directory e.g. <span style="font-family:monospace;">/repos/examples/</span></li>
<li>select all projects a, b, c - from context menu click
<b>Team > Share Project > Git</b>
</li>
<li>press
<b>Next</b>
</li>
<li>select all projects a, b, c</li>
<li>the wizard automatically moves up the default repository location to the parent folder <span style="font-family:monospace;">/repos/examples/</span> since multiple projects have been selected</li>
<li>click
<b>Create Repository</b> and
<b>Finish</b>
</li>
</ul>
<p>
<br/>
</p>
<h2 id="Starting_from_existing_Git_Repositories">Starting from existing Git Repositories</h2>
<p>In order to work with the content of a Git repository in the Eclipse workbench, the contained files and folders must be imported as projects. In principle, this import 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>
<h3 id="Starting_the_import_wizard">Starting the import wizard</h3>
<p>To start the wizard click
<b>Import > Git > Projects from Git</b>
</p>
<p>If you started in a clean workspace, the first page will display an empty list:</p>
<p>
<img border="0" src="images/Egit-0.9-import-projects-selec
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
JFrame可以做出类似于QQ登录功能的窗体,通过JFrame可以利用Java代码实现窗体功能,一般用于CS项目的C(客户端)的开发; 利用JFrame可以自己写java代码,也可以通过在eclipse中安装windowbuilder插件,这样可以利用windowbuilder插件对窗体进行可视化的快速创建、操作等,快速实现编程的开发; 但是,许多初学者下载的eclipse工具是没有windowbuilder插件,并且集成该插件后eclipse不能正常工作,会出现闪退情况。 资源中的版本是成功整合了windowbuilder插件的eclipse版本。下载后直接解压就可以使用,无需安装和另外安装插件。 你也可以很轻松就能上手和使用这个版本的eclipse。
资源推荐
资源详情
资源评论
收起资源包目录
swing-eclipse.rar (4980个子文件)
.fileTable.10 94B
.fileTable.11 159B
.fileTable.11 94B
.fileTable.12 159B
.lazy.4 2.11MB
.bundledata.4 383KB
.state.4 132KB
.mainData.5 3.13MB
.extraData.5 895KB
.table.5 159KB
.contributors.5 49KB
.namespaces.5 45KB
.contributions.5 29KB
.orphans.5 137B
ant 10KB
antRun 861B
.api_description 2KB
.api_description 445B
.api_description 384B
.api_description 367B
.api_description 202B
ant.bat 7KB
antRun.bat 1KB
lcp.bat 1KB
splash.bmp 533KB
splash.bmp 394KB
MarketplaceWizard.class 24KB
MavenProjectWizardArchetypePage.class 23KB
MarketplaceDiscoveryStrategy.class 21KB
Messages.class 20KB
LifecycleMappingsViewer.class 19KB
MarketplaceViewer.class 19KB
DiscoveryItem.class 18KB
MavenImportWizardPage.class 17KB
MavenInstallationsPreferencePage.class 17KB
MavenProjectWizardArchetypeParametersPage.class 17KB
ProfileChangeOperationComputer.class 16KB
MavenRepositorySearchDialog.class 15KB
MavenRepositoryView.class 15KB
UpdateMavenProjectsDialog.class 15KB
PomEdits.class 14KB
MarketplacePage.class 14KB
LifecycleMappingPage.class 14KB
FeatureSelectionWizardPage.class 13KB
MavenImportWizard.class 13KB
MavenPomSelectionComponent.class 13KB
MarketplaceCatalog.class 13KB
ControlDecoration.class 12KB
SelectionUtil.class 11KB
MavenInstallFileArtifactWizardPage.class 11KB
SelectionModel.class 11KB
OverviewToolTip.class 11KB
MavenSettingsPreferencePage.class 11KB
OpenPomAction.class 10KB
MavenConsoleImpl.class 10KB
MavenModuleWizardParentPage.class 10KB
MarketplaceWizardCommand.class 9KB
CatalogSwitcher.class 9KB
AbstractProvisioningOperation.class 9KB
MavenProjectWizardArtifactPage.class 9KB
PomHelper.class 9KB
EditDependencyDialog.class 9KB
MarketplaceInfo.class 9KB
IndexSearchEngine.class 9KB
MavenModuleWizard.class 9KB
ShareSolutionLink.class 8KB
MavenProjectWizard.class 8KB
MarketplaceClientUi.class 8KB
RemoteArchetypeCatalogDialog.class 8KB
LocalArchetypeCatalogDialog.class 8KB
MavenArchetypesPreferencePage.class 8KB
MavenProjectWizardLocationPage.class 7KB
AbstractMavenWizardPage.class 7KB
CustomArchetypeDialog.class 7KB
LifecycleMappingOperation.class 7KB
WorkingSetGroup.class 7KB
LifecycleMappingPage$2.class 7KB
MavenImportWizard$2.class 7KB
MavenProjectWizardArchetypePage$17.class 7KB
BrowseCatalogItem.class 7KB
LifecycleMappingPage$1.class 7KB
MavenDependenciesWizardPage.class 7KB
MavenArtifactComponent.class 7KB
MavenPomWizard.class 6KB
MavenPomWizardPage.class 6KB
MavenPomSelectionComponent$SearchJob.class 6KB
ProposalUtil.class 6KB
MavenImages.class 6KB
MavenParentComponent.class 6KB
PomHierarchyComposite.class 6KB
M2EErrorDialog.class 6KB
MavenProjectPreferencePage.class 6KB
InputHistory.class 6KB
EnableNatureAction.class 5KB
ItemButtonController.class 5KB
MavenGoalSelectionDialog.class 5KB
LifecycleMappingPreferencePage.class 5KB
MarketplaceCatalog$8.class 5KB
MavenGoalSelectionDialog$GoalsContentProvider.class 5KB
MarketplaceUrlHandler.class 5KB
共 4980 条
- 1
- 2
- 3
- 4
- 5
- 6
- 50
资源评论
小码哥Lvan
- 粉丝: 1176
- 资源: 4
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功