1. Download the Egit plugin
Open Eclipse,git requires eclipse authorization, and the Egit installation package cannot be downloaded through the webpage. In the menu bar, open the Eclipse→help→install New software→add,name column, enter http://download.eclipse.org/egit/updates/in the Egit,location column. , click OK to download. You will be prompted to restart eclipse when the download is complete;
2. Give the public key in Eclipse and add it to GitHub repository.
in the menu bar, open window→preference→general→network connection→ssh2→key management→generate RSA Key ... →apply→save private Key ...
The public key that generates SSH is passed in GitHub: Edit your profile, SSH key, add SSH key, and copy the public key generated above to here, save.
3. Import existing Projects
Open a project, right-click on the project name, Tap Team→share Project, and import your project into a git folder.
4. Submit
Right-click on the item –>team–>commit. Commit is the GIT repository that commits to the native, and push is synced to GitHub.
Enter your github username and mailbox in the pop-up window
Submit the file locally and push it to the server
Then you need to enter the warehouse address of the project on GitHub, and if not, create a new project with the following steps:
Enter the URL address above, along with your user name and password
And then wait for Eclipse to submit the project to you.
5, the submission may appear can not connect the error, please refer to
Dust Project Hosting GitHub process
Use the command line to generate a local SSH, establish a connection, and then submit the code with eclipse.
Detailed Egit user's manual (graphic)
Source: Configure the GIT environment in the Eclipse development environment of Android