Use GitHub to manage Eclipse Distributed Project Development

Source: Internet
Author: User
Tags git client

Use GitHub to manage Eclipse Distributed Project Development

In the previous article (GitHub manages iOS distributed project development), we introduced how to manage iOS distributed development. Today, we will introduce how to use GitHub to manage Eclipse distributed projects. In fact, our team is developing a multi-mobile platform project. In addition to the iOS platform, there are Android and Windows Phone 7 platforms. Using github to manage our Android project is actually configuring and using Eclipse.

Below I will summarize some experiences based on our experience as follows:

1. download and install the Egit plug-in Eclipse;

2. Create a code repository;

3. Use the Egit plug-in Eclipse

Download and install the Egit plug-in Eclipse

Open the Eclipse menu Help-> NewInstall Software pop-up dialog box. Enter egit in Work with to find the installation address of the egit plug-in.

Install the egit plug-in and require Eclipse3.6 or later.

Create a code repository

After installing the egit plug-in, you can create a remote code repository on the github server to correspond to the local code repository. Log on to https://github.com/with your account /. Create A Repository.

Enter "Hello-Android" in the Project Name. This is the Name of our Project and the Name of our code repository. Of course, a code repository can also contain multiple projects.

Click "Create repoitory" to Create a code repository. The following figure is displayed. You need to Create a local code repository locally.

However, in Eclipse, create the project "Hello-Android" and create a test file, as shown in.


 

To connect to a remote code repository, you need to make some configuration. Open the Git Bash terminal and enter the command:

$ Git config -- global user. name "your username" Note: it may not be your account

$ Git config -- global user. email "your email" NOTE: registered account

$ Cd Hello-Android Note: Created project directory

$ Git init

$ Touch README

$ Git add README

$ Git commit-m'first commit'

$ Git remote add origingit@github.com: <your account>/Hello-Android.git

$ Git push-u origin master

NOTE: If your git client software is not installed, you can download and install and configure SSH Keys at the following address: http://help.github.com/win-set-up-git /.

If the local project is successfully pushed to the github server, open github to view the Hello-Android code repository.

Use Egit plug-in Eclipse

The local and remote code repositories are created and configured. Next, use the Egit plug-in Eclipse.

If you are not an administrator, you only need to clone or import the remote code repository of the github server to your local computer. Right-click Eclipse and choose Import from Git-> Projects from Git.

Select URI, which means to import a project from the remote server code repository.


Enter the git@github.com: tonyguan/Hello-Android.git in URI.


 

Click Next to check the password.

Enter the password and then it will be easy. You can import the project with some options.

If you modify the code, the file is not submitted.

To submit a file, right-click the project and choose Team> Commit from the shortcut menu to bring up the submit dialog box. Enter comments submitted in commit message.


Click the Commit button to submit the file.

The successful submission only means that the file changes are saved to the local code repository, but not pushed to the remote code repository. Open the Eclipse Perspective window and select Git Repository tracing ing.

Then choose Remotes-> origin-> git@github.com: tonyguan/Hello-Android.git for Hello-Android.

Right-click the menu and select Push to start pushing the local code to the server.

If you want to download the code from the server, select the green arrow above. The other usage is no different from svn, so we will not repeat it here.

GitHub Tutorials:

Create a personal technical blog via GitHub

GitHub tutorials

Git tag management details

Git branch management

Git remote repository details

Git local Repository (Repository) Details

Git server setup and Client installation

Git Overview

Share practical GitHub tutorials

GitHub details: click here
GitHub: click here

This article permanently updates the link address:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.