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, uninstall
Different eclipse offload is not the same:
1. In Eclipse, click menu "Help" and "about Eclipse". Pop up the dialog box shown in Figure 1, click on the "Installation Details" button and pop up the dialog shown in Figure 2. Select the plug-in you want to uninstall (press and hold CTRL to multi-select), and click the Uninstall ... button.
2.adt--about Adt,
Click Installation Details
Pop-up the box below to find the appropriate plugin to uninstall
After selecting the plugin that needs to be uninstalled, click Uninstall to uninstall. CTRL + LEFT mouse button can choose more Ha
1. After uninstalling, install git, and install the general plugin process as follows:
"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. (I use Githob as an example, githob more useful, we can put their own projects are transmitted up, both anytime and anywhere to the code clone down development, can also be used as a network disk)
To Githob, register 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 items listed below, then click Create Respository 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 Remote repository project into eclipse
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.
Using Git in eclipse