Install and use git on the Android platform Eclipse
1. Apply for a code repository on GitHub
First, you need to apply for a code repository. GitHub is recommended. there are charges and no charges.
Click New repository
After you have filled in the relevant information, your own code repository appears, and the http address can be used.
Common Git commands are displayed here.
2. Install the Git plug-in on eclipse
Help ------- Install new software
Select All and click Next.
After the installation is successful, click
Preferences ------- Team -------- Git ------ Configuration
New Entry
Enter the user name and email address. When the code is submitted, the information is automatically extracted and sent together with the code to the git remote repository.
3. Create your own project and associate it with the Git Repository
Create your own project.
Select
Right-click the Project -------- Team --------- Share Project ---------- Git, select your Project Next, and Finish the Project.
4. Submit the code to the repository
The code is submitted to the local repository in two steps, and then to the remote repository.
First, submit it to the local repository.
Project -------- right-click Team ------ Commit
Enter comments, select the file you want to submit, and submit.
5. push the project to a remote warehouse
Right-click the project ----------- Team -------- remote --------- push
The Url entered by GitHub is used. Enter the GitHub account in User and Password.
6. Clone remote repository code
Switch the view to the Git view. Window ------ Open perspective
Click Clone Git Repository
Enter Url and account password
Select a Directory
Import the project to Eclipse using Import.
7. Submit code to remote
Like above, commit is sent to the local device, then remote and push to the remote device.