Git contact is also relatively long (but has been mengmengdongdong, command to see and forget), blogging also has a period of time, but have never thought that these two things will be linked together. My habit is to write a blog before I do a demo, the problem is clear before beginning to write, before the blog is to upload the code to Baidu Cloud disk for the students to download, and later saw a lot of students like to put their own project on GitHub, feel good, so, I also try, today tried a bit, It feels good. Write it down and share it with you.
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.
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced. If there is a wrong place, I would appreciate it if I could criticize it.
Using Git in eclipse