Upload your code using GitHub in Eclipse and how to create a branch

Source: Internet
Author: User

Eclipse or STS basic operation on GitHub

A GitHub Upload Code
1. Start by creating a new Maven or other Java project.
Then change the local default git store address.


The above GIT project storage address according to their own needs, location arbitrary storage.

  1. Right-click on the item and follow the instructions shown





Two Now the above operation is to build a git repository, the following start uploading code to GitHub for hosting
But before this, the reader needs to register a github account (many online tutorials, I do not elaborate here)
1. Right-click on the project and select Team->commit



Classpath and project are best not checked

  1. Next, right-click the project and select Team

  1. Fill in the Git address, user name and password

Here is the git address, paste it over to




The above code is submitted to the Master trunk, and the next thing to say is how to commit the code to the branch

Note: The above commit is committed to the master trunk, if you need to commit the code to the branch you have established. Do the following:

Three Submit code to Branch
1. First create a new branch on remote GitHub

2. First submit the project to the local, which has said.

3. Create a new branch dev, note that this branch is remotely available!


4. You can then submit the code to the branch.






Submit Success

Upload your code using GitHub in Eclipse and how to create a branch

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.