Eclipse submits code to GitHub

Source: Internet
Author: User

Eclipse submits code to GitHub

1. To use GitHub, you first need to register a GitHub account and create a repository. This has basically become a necessary skill for every programmer, so don't dwell on it here.
2. Install the Git plugin on eclipse
First choose Help, Install New software:

Pop up the following window and click the Add button:

Pop up the following window and enter the appropriate content:

The value of name can be entered arbitrarily, it is recommended to see the name of the meaning;http://download.eclipse.org/egit/updates
Select the default down to OK. You will need to restart eclipse after the installation is complete.
User information for GitHub needs to be configured in the configuration, Team-I, Windows, Preferences.

3. Create a Java project in eclipse (this article takes a Java project as an example, other projects are similar). Right-click on the project name to select Team--Share project:

Select Git and click Next:

The first time you need to tickUse or create repository in parent folder of project

Select the item, clickCreate Repository

When you are done, you create a git repository on this computer. A small icon for the question mark appears in the file in the project.

At this point, you can submit the code to the local repository, and on the project, right-click on team--commit

You can select a file to submit, or you can select Submit all.Commit messagemust be filled in.

ClickCommitbutton to submit the code to the local repository. Of course you can also clickCommit and Pushbutton to submit the code to the local repository and upload it to GitHub.
If you click on the Commit button, the next step is to push the code onto GitHub. Right-click Project Select Team--Remote---Push

Enter the URI of the repository created earlier on GitHub

Host and repository path are automatically generated and do not require input. User and password need to be entered.
Next select the branch, where master instead of head is selected.

Then click Add Spec


Click Done to upload the success. At this point, check to see if the code has been uploaded on GitHub.
If the upload is not successful, the previous step may not be checkedForce Update。 It is recommended to check each upload.

Eclipse submits code to GitHub

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.