Install git plugin on Eclipse egit and use

Source: Internet
Author: User

First, install git plugin on eclipse egit

Eclipse version Eclipse-java-helios-sr2-win32.zip (no corresponding Egit plugin was found in Eclipse3.3 version and cannot be installed)

Egit Plugin Address: http://download.eclipse.org/egit/updates

OK, then follow the next step by default installation to restart Eclipse after installation

Second, configure Egit in Eclipse

Preparation: Need to register account on https://github.com

Preferences > Team > Git > Configuration

The user.name here is where you registered your username on https://github.com.

User.email is the mailbox you bound on GitHub. You can configure User.Name here

Create a new project and submit the code to a local git warehouse

1, new project Git_demo, and new Helloworld.java class

2, the Git_demo project submitted to the local warehouse, the following figure

In this step, you successfully create a git warehouse. But the folder is in the untracked state (the symbol "?" in the folder). ), we need to submit code to the local warehouse, as shown below

OK, so the code is submitted to the local repository

Four: Submit the local code to the remote git repository

Preparation: Create a warehouse on https://github.com

Click "Create Repository", OK, so the warehouse on the GitHub is ready.

Note Create a good remote warehouse, click in, you can see an HTTP address, such as red box, this is your HTTP protocol remote warehouse address

The preparations are ready, so start submitting the code to the remote repository.

OK, so submit remote Git is complete, you can check the https://github.com to see if the code has been submitted

attention to the problem

If the first submission will be the first step: Create a local warehouse, called the local warehouse.

Step two: A local commit will commit the update to the local repository;

Step Three: Merge the server-side update pull to the local warehouse, and finally push the merged local warehouse to the server side so that a remote commit is made.

If the same reason is not first submitted

First step: Update the modified code commit operation to the local repository;

Step Two: Step three: Merge the server-side update pull to the local warehouse, and finally push the merged local warehouse to the server side

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.