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.