Eclipse software works with Git to create a git repository

Source: Internet
Author: User
Tags email account

First, install Git on eclipse, just like installing other plugins

Help->install New Software->add ...

Enter Name,location in the pop-up box; click-"OK"

In this step, check all the options under Name, click Next to install, and then restart eclipse after installing.

After reboot, make a simple configuration

Click Windows->preferences, Team---git->configuration appears

Click Add Entry ... Enter key value

Key, name fill in: User.name,value is your name

E-mail: User.email value: Your email account. When you submit your code, it automatically extracts the information and sends it to the GIT remote repository along with the code.

Click OK

Two-step assumption that you already have a GitHub account, if not please go to the website to apply, create a warehouse on the GitHub website. Click on ' + '-"New repository"

Name, fill in the test

Description, write a little description of the line.

Click the green button below to create repository

A warehouse is generated and https://github.com/crazyCodeLove/test.git is used after the copy warehouse address.

This is the second step to complete

Iii. creating a project with Eclipse

Name is test, dot finish.

Next right click on Project---team---share project

In the pop-up box, select Use or create ....,

Click on the items listed below, then click Create Respository below, and finally, finish, just
Created a local warehouse

And then write the code, I'm python. So create a new module, write a function

3) Submit the code to the local repository (the code must be submitted to the local repository before it can be submitted to the remote Git repository)

First you need to commit the code to the local repository:
In order: Right-click Project >team>commit

Drag the unstaged changes to the staged changes box, then enter a comment in the commit message and click Commit

At this point commit to the local repository (commit and Push git has this, some do not, use he can put the code directly to the local and submitted to the remote Git up).

Push the project to the remote repository:

Project Right-click--->team--->remote--->push

Enter the URL: On Githob, create a project to get to, copy it in. Fill in your login Githob's account password, next

Click on the small triangle, select Master---"ADD spec---" Finish

Next Click OK

When you're done, sign in to your GitHub account to see the code on your push!!!

Iv. to clone a code repository on a remote GitHub to a method in local eclipse, switch to git view first

Window--->show view--->other---> Git--->git repository

Click Clone Git Repository

Or, click: there is an arrow that.

Fill in the URL of the item you want to clone: Enter your account number and password

--->>next--->>next

Click Browse and select a place to put the project file. Do not put in Eclipse working directory

Finish

When you are finished, import the project into eclipse

Other:

Submit code once to Git repository

Committing the code and committing the entire project to Git is the same, first, commit, put the code you need to commit, commit to the local, and then, Remote,push, commit the project to the remote.

Clicking on the item, right, and creating a branch can also be submitted, but he will not be with the main code. With merge, you can merge.

V. Delete a warehouse on GitHub

After logging in to your GitHub account, open the Git repository you want to delete, such as test

Click Settings on the right of code to find the delete this repository button at the bottom right

And then you need to confirm. Enter the warehouse name to delete: test

Then click I understand the con ... button, you can delete the existing warehouse.

Eclipse software works with Git to create a git repository

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.