Use GitHub to manage eclipse Distributed Project Development In my previous blog (GitHub manages IOS distributed project development), I introduced how to manage IOS distributed development on GitHub. We will introduce how to use GitHub to manage the eclipse distributed project. In fact, our 516inc team is developing a multi-mobile platform. Project, in addition to the iOS platform, there are also Android and window Phone 7 platforms. Using GitHub to manage our android project is actually Configure and use 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. In eclipse Right-click the menu import and select 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 in commit message Comments submitted. 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. There is no difference between other functions and SVN. I will not go into details. |