Eclipse git commits the project

Source: Internet
Author: User

One, using the eclipse comes with the plug-in submission Project 1, comes with the Git plugin to configure our user name and password, that is, their own github registered users.

Windows-perferences-team-git-configuration

Click Add Entry ... Enter the email address and name of your user name

2. Eclipse generates SSH2 key

Windows--perference--general--network Connection--ssh2-key management--general RSA key

You can add multiple SSH2 keys to see if the build key is on the default system disk (C-drive).

Then paste the generated SSH2 key onto GitHub, login github--settings--ssh and GPG keys--new SSH key

(This step can not be omitted, be sure to check the generated public key with the command is normal)

To do this, execute the command: ssh-t [email protected] The following information appears, proving that the configuration was successful.

3. Create a project locally as "Testgit"And the local Git repository

Open Eclipse, create project "Testgit" and write something, then "File"-"Team"-"Share Project"-"Git"-"Next"

As shown, the project "Testgit" becomes a git repository, the project is opened under Workspace, and a hidden file ". Git" is found, but the project is in the untracked state (file? ), we need to submit the code to the local repository, such as:

Note that the file to be submitted in unstaged changes, right-click Add to index or drag to staged changes bar, you can add files to the GIT index for version monitoring. You can then commit the commit to the local repository.

Next we submit the local project to the remote Remote repository github (the remote repository name on the GitHub network is the same as the local warehouse name, indicating that the local warehouse is submitted to and associated with the remote repository):

where commit, just commit to the local repository, requires push to upstream submission to the remote repository

Finally, log on to GitHub to see if your files were successfully submitted,

Notes

1. Submitting the project to the remote repository using the Eclipse plugin must be committed locally and finally committed to the remote repository

2, see who submitted the code, the project right-click Team--show history

3, view the change record team--show in the history

4. Undo recovery Change Replace With--head revision

5, UPDATE project remote warehouse Team--pull

6. See which files have been modified Team--synchronize workspace

7. When submitting a project, be careful to ignore unnecessary files or folders, such as the target file under the MAVEN project

8, GIT provides a multi-protocol to connect to the GIT server, the most common is HTTPS and git,git is to be free of users and passwords;

Different protocols, the project connection address is differentiated, as follows: HTTPS form: https://github.com/XXX/pbqshop.git git form: [Email protected]:xxx/pbqshop.git

Eclipse git commits the project

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.