One in the previous administration introduced GitHub iOS distributed development, today the old customs will introduce the use of distributed Eclipse GitHub project management. In fact our team in this project to develop a multi-mobile platform, in addition to iOS and Android platforms as well as Window Phone 7 platform, using github manage our Android project, in fact, is to configure and use Eclipse.
Below I summarize some ideas based on our experience as follows:
1. Eclipse plug-in to download and install Egit;
2. Create a code repository;
3. Use Egit plug-in Eclipse
Eclipse plug-in to download and install Egit
Open the Eclipse menu Help-> NewInstall Software pop-up dialog box. Work with the input egit, find the plug-in installation address egit.
Then install egit plug required Eclipse3.6 above.
Create a code repository
After installation is complete egit plug, we can create a remote server on github code repository for the corresponding local code repository. Use your account login https://github.com/. Create A Repository.
Enter "Hello-Android" in the Project Name This is the name of our project, it is also the name of our code repository, of course, a code repository can also have multiple projects.
Click "Create repoitory" code repository will be created, the following screen appears, which also need to create a corresponding local code repository locally.
But before you create a project "Hello-Android" in Eclipse, and create a test file
To be able to connect to a remote code repository, you need to do some configuration, open Git Bash Terminal enter the command:
$ Git config --global user.name "your user name" Note: you can not account
$ Git config --global user.email "your email" Note: Register account
Create a project directory: $ cd Hello-Android Notes
$ Git init
$ Touch README
$ Git add README
$ Git commit -m 'first commit'
$ Git remote add firstname.lastname@example.org: / Hello-Android.git
$ Git push -u origin master
Note: If your git client software is not installed to the following address can download and install and configure SSH Keys: http: //help.github.com/win-set-up-git/.
If all goes well, the local project has been successfully pushed to github server, and open the github view Hello-Android code repository
Use Egit plug-in Eclipse
Local and remote code repository is created and configured, the next step is to use the plug-in Eclipse using the Egit.
If you are not an administrator, you only need to github repository server remote code clone or import locally. Eclipse in the context menu select Import Git-> Projects from Git
Choose URI, which is meant to import a project from a remote server code repository.
Enter email@example.com in the URI: tonyguan / Hello-Android.git.
Click Next to have the password verification process.
Enter the password and then very simple, do some of the options you can import a project.
If you modify the code in this file is uncommitted state.
Submission of documents by selecting the project in the context menu Team-> Commit pop commit dialog. Enter a comment on the information submitted in the commit message.
Click the Commit button will submit the files.
Submit success just means, save the file to a local change in the code repository, but not pushed to remote code repository. Open the window, select the Eclipse Git Repository Exploring Perspective
Then select the Hello-Android Remotes-> origin-> firstname.lastname@example.org: tonyguan / Hello-Android.git.
If you wanted to download the code from the server is selected above the green arrow. As for the other use svn there is no difference, we will not repeat them.