Git in Eclipse uses

Source: Internet
Author: User
Tags email account

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 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 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.

Git in Eclipse uses

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.