First, install the EgitOpen Eclipse's Marketplace, enter Egit in the search box, You can see that Eclipse4.4 has been installed by default Egit, of course, if there is a new version of Egit released, you can also click on the update updates, you can also click Uninstall Uninstall the PluginSecond, configure GitOn projects in Eclipse, right-click to select Team->share Project
After configuring the path of the local warehouse, as shown in the Click Finish, the project can see a lot of question marks, which means that the file is in the untracked state, not submitted, this time can be found in the Eclipse workspace, the original project folder is missing, The entire project's files are transferred to the repository set up above, a new repository in GitHub, the name does not matter, can be the same as the local project can be different, after the project in eclipse right click, select Team->commit, when the full selection, The Commit button will be available, click "Commit" to submit the code to the local local repository, note that it is not submitted to the remote repository on GitHub, when the question mark icon on the item disappears and becomes the shape of the small bucket.iii. configuring SSH for Eclipsewindow->preference - General -Network Connection -SSH2 -Key Management -generate RSA Key ... -Apply -Save private key ..., then add id_rsa.pub content to GitHub (GitHub settings has ssh keys->add ssh key-> will id_ Rsa.pub content is filled in key, title any)! Note To restart eclipse after the configuration is complete. Iv. PushThis time the project right click on the->team->remote->push, the following interface will appear, to GitHub, open your new warehouse, copy the HTTPS address, and then fill in the URI, user will fill in your GitHub user name, Password is your password after clicking Next, it will appear in ref to select Master, then click on the Add button, then click Next, then the Confirm interface will appear, click the Finish button, the project will be pushed to the remote repository on GitHub , if it goes well, it will be finished soon. This time if you encounter the rejected interface, the instructions have not been configured,If you point team->remote->push, no matter how the match is not successful, no fast farward or the like, it means to pull from GitHub first, and then push. When you pull, you will immediately prompt a variety of not configured well. This can be done as follows: Point window->preference->team->git->configuration->repository settings,repository Select the built-in local warehouse And then point to the right of openModify the contents of an open config file to
[Core] Symlinks = False repositoryformatversion = 0 FileMode = False Logallrefupdates = True Bare = False IgnoreCase = True Hidedotfiles = dotgitonly [remote "origin"] URL =[email protected]: Shijiebei2009/documentmatching.git
Fetch = +refs/heads/*:refs/remotes/origin/* [branch "master"] Remote = origin Merge = Refs/heads/master [User] Name = shijiebei2009 email =[email protected]
|
The URL address in this is the SSH address on GitHub.Five, pull first, then pushthen push it again to succeed!
Eclipse4.4 Installing the Egit plugin submit the local project code to the remote repository