1. A simple configuration, fill in our user name and email
Preferences "Team" git>configuration
Click Add Entry to fill in the Key,value in the box below. (name ZC; email [email protected])
e-mail: Email value: Your email account. When you submit your code, it is automatically extracted and sent to the Git remote repository along with the code.
If the effect is completed
2. Take GitHub for example, first register an account
Click New Repository, enter the project name as required, Project introduction, choose Public,private, to charge. Click Create, it's all right. Name, don't use Chinese oh. Get shown, click HTTP, copy HTTPS, for a moment, submit the project with
Appears after clicking New Repositroy
Click Create repository to copy the link to the project
3. Create a project and a local git repository, open Eclipse, create a project, and then click: Project > Team > Share Project Select Git>next
Tick, click on the items listed below, then click Create Respository below, finally, finish, created the local warehouse
4. Submit the code to the local repository (the code needs to be submitted to the local repository before it can be submitted to the remote Git repository)
First you need to commit the code to the local repository:
In order: Right-click Project >team>commit
Here you need to add unstaged changes files to staged changes, click the file you want to add, right-click, click Add to Index can add the file in,
In the commit message, fill in the project information, then commit, commit to the local repository (commit and Push git has this, some do not, use he can submit the code directly to the local and commit to the remote git up).
5. Push the project to the Remote repository: Project Right-click >>team>remote>>push
Enter the URL: On Githob, create a project to get to, copy it in. Fill in the account password of your github login, next
Click on the small triangle and select Master->add spec->finish.
After the completion, landing githob, you can see the project has just been submitted.
6. Clone the remote repository project into Eclipse and switch the ecpilse to Git view
Ways to switch to the Git view
Enter Git in the red box and choose Clone a Git Repository
Appears as shown in: Fill in the URL address of the item you need to clone.
Click Next->next, click Browse, select a place to put the project file. Do not place in Eclipse working directory, finish
When you are finished, import the project list in eclipse with import
Click on the Red box, browse to select the project, Finish.
Using Git in eclipse