Some eclipse has already brought git with it, so it doesn't have to be installed. If you want to reinstall, you can uninstall git first, then install
1. Install Git as you would install the general plug-In process:
"Help--install new software
In the box that pops up, enter git:http://download.eclipse.org/egit/updates/
Click OK, if not, please click on the Add Front triangle to find the first git-named item, wait a moment, this box appears
Under Name 2, click Next and go to install. After installation, the eclipse is restarted and the installation is complete
Or, click Help--marketplace, enter Git in it, find it, and install it (some eclipse has this, and some don't)
After installation, proceed, a simple configuration, fill in our User name and mailbox
"Preferences" Team "git>configuration
Click Add Entry to enter the value of key and value in the popup box.
Key, name fill in: User.name,value is your name.
E-mail: User.email value: Your email account. When you submit your code, it automatically extracts the information and sends it to the GIT remote repository along with the code.
2. (1) Submit the project to the remote Git repository for the first time.
Go to GitHub, sign up for an account, log in.
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
(2) Create a project and a local git repository
Open Eclipse, create a project, and then
Sequence: File > Team > Share Project Select Git>next
Tick, click on the item listed below, then click on the button below, finally, finish, on
Created a local warehouse
(3) Submit the code to the local repository (the code must 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
Enter a comment, then tick the file you need to submit, or tick the right, and click Select All.
Then commit, commit to the local repository (commit and Push git has this, some don't, use he can submit the code directly to the local and commit to the remote git).
(4) 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 your login Githob's account password, next
Click on the small triangle, click on Master,add spec. Finish
When you are done, log in to Githob and you can see the project you just submitted.
(5) Cloning the project of the remote repository into eclipse (Windows-showview-other-git-git repository)
Switch ecpilse to Git view
Click Clone Git Repository
Or, click: there is an arrow that.
Fill in the URL of the item you want to clone: Enter your account number and password
>>next>>next
Click Browse and select a place to put the project file. Do not put in Eclipse working directory
Finish
When you are finished, import the project into eclipse
It's the same as importing a general project.
(5) Submit code once to Git repository
Committing the code and committing the entire project to Git is the same, first, commit, put the code you need to commit, commit to the local, and then, Remote,push, commit the project to the remote.
Other, click Project, right button, can also create branch, branch can also be submitted up, but he will not be with the main code and together. With merge, you can merge.
Version control in eclipse using Git