First install the Egit plug-in in eclipse, such as:
1.
2. Click Add
3.
4.
5.
Installing plug-ins for Eclipse is rarely encountered and is not masked. The installation process is not long and can wait.
After the installation is successful, we can use it.
First, upload the code to the local warehouse
We create a new Android project, right-click, select Share project in Team
If you use it for the first time, you'll need to create a local repository first, which is uploaded to the local repository before it can be uploaded to the remote repository. So click Create here.
When you're done, you'll see that our project becomes this way, with one more question mark on each.
In the Android project, we do version management, but do not use the Management bin this folder, we have to ignore this folder, the way to ignore the following:
Select the file or folder, right-click, and select Ignore in team.
After doing this, we have one more file in the code for our local warehouse project,
Files that do not require version management are documented here:
Once this is done, we can submit the code to the local repository:
.
Second, upload the code to the remote repository
1. Create a new warehouse:
After logging on to GitHub:
And then:
Enter the warehouse name and click Create.
After the creation we can upload:
And that's it:
This allows you to upload the code.
Many steps, the process is actually very simple. I've had some articles about the commands used in Git, and it's interesting to see.
The use of Git in eclipse