Use the eclipse egit tool to upload code to GitHub

Source: Internet
Author: User

I recently learned how to use the version management tool and want to synchronize code to the GitHub website in eclipse. github.com is a free open-source code management website. The environment is set up:

Win7 + eclipse + gitbash, Environment build Google solution, reference: http://xleon.iteye.com/blog/1484884

Note: You need to use git bash for command line Input. You need to obtain the SSH key and add it to the GitHub website account.

Start-> Git-> right-click to open it as an administrator
Git bash, In case administrator permissions are required in other places.

Then you can check the connection with the GitHub site through the ssh-Vt git@github.com, such as the connection is normal, will appear in the last 5th lines, hi *** you 've successfully authenticated,
GitHub does not provide shell access. The connection is successful and the account can be used properly.

Then you can create a code repository on GitHub, such as helloworld. After the repository is created, you can find the repository SSH address in files, and submit the code to find the address, it also includes other HTTPS addresses.

In the local project directory, right-click git init here to initialize the GIT project locally, and configure the GIT environment according to the online method. Including the user name and email address.

Error: git updates were rejected because the tip of your current branch is behind reference http://www.linuxidc.com/Linux/2012-04/58985.htm

Use git push-F origin master to solve the problem.

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.