Eclipse uses Git's most basic process (the way to submit a remote repository)

Source: Internet
Author: User

Sign up for a GitHub account

Once the registration is complete, click on the settings (that is, the gear, set icon) in the upper right corner.

Use of Step6 Egit

First, log in to your GitHub account, click the plus sign, select New Repositrory, and create a fresh repository.

The name is Test2, and the others are all by default.

Click the green button to create a GitHub repository.

Copy the address and save the backup.

Open Eclipse and, as usual, create a new Web project or other project that you use frequently. My project here is called Scott.

Right-click the project and select Team->share Project, which pops up the following window.

Select Git,next, in the Popup interface, ① first check the use or Create......,②createrepository,③ check the project, ④finish.

At this point, you create a git project, right-click on the project, select Team, you can do commit,synchronize like SVN, but in the remote operation, push is gray, indicating that the code cannot be pushed to the GitHub repository.

At this point, open the Git repository view (specifically how to open Baidu, this is the basic common sense)

Right-click Create Remote, click OK

Click Change to bring up the following screen

The URI is entered in the previously copied address on GitHub, and the content below is automatically filled in. You just need to fill in the username and password on GitHub. Finish,save.

The next few steps are simple, write the code in the project, and then submit the new code locally, for example, the Cat class, add to index first, then commit. At this point, the right-click Project, with the push option in team->remote, means you can save your local code in GitHub. Congratulations to you!

Click on Push, click Add All Branches Spec, add the local repository, then finish, follow next, and see GitHub again to see that the code has been pushed successfully.

Finally, take a look at our code on GitHub!

How Eclipse works with Git

Oh, look at this. Go ahead and install Eclipse. Then, in the Egit, you should be able to download it from Eclipse's official website. 1 Install this installation is not much to say. Very simple. Unzip the downloaded file and create a git file directory under Eclipse. Create a Git.link file under Eclipse dropins: path=/home/yangzhi/eclipse/git/and then restart Eclipse is OK. 2 Configuring personal Information Next Configure personal information: Windows->preferences->team->git->configuration Click Add entrykey Value: Enter User.namevalue: GitHub username re-enter: User.emailvalue: Your mailbox. 3 Building a warehouse first build a project: Then File->team->shareproject click Create Repository Then finish. After the build, there will be a hidden. git file under your project, which is the repository information. However, there are no branches at this time, are in the No-head state. 4 configuration. Gitignore Commit Team->commit After the first commit, the master branch is automatically generated and now you can create a new file, and you can see that the question mark is still In the untracked state, Git is not monitoring him. You can add an index by Team->add to index. You can also cancel the index by Team->untrack. 5 Viewing history Team-show The history can be seen, of course, version comparison. Contrast mode: 6 remote Management Warehouse, docking with GitHub. All that is used in the previous operation is local. So here's how to start managing GitHub remotely. First, open the Git repository interface. Clone a repository to a local: then enter GitHub's link information, where the user's password, for your github user password: Then always next, finish is OK, the project will appear in the Git repository interface. Then you can edit the project information next. You need to commit to a remote server. You can choose team->remote-> Push. You can submit the code to the current branch.

Eclipse git uses

Commit: Commits a modified or deleted file to the library, typically after git add
Pull: The update is dragged from the remote repository to the local
Push: Trial teaching local repository update pushed to remote
Remote: Query the remote repository or set the remote repository '
Merge: Merges a sub-branch on the current branch to the current branch
Swich to: Converting to a used branch
Reset: Restore the warehouse to a node

Reprint http://www.bkjia.com/Javabc/884793.html

Eclipse uses Git's most basic process (the way to submit a remote repository)

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.