Git has similar functionality to Svn.
How do we want to use Eclipse to upload projects to our own GitHub?
Today I successfully uploaded a project to share with you here.
First, you need to install a plug-in on eclipse: Operation steps:
1. Install the EGit plugin on your own Eclipse
1、
2、
The address is: http://download.eclipse.org/egit/updates
Then after we agree to the agreement, we proceed to download. After the download is complete, you need to restart Eclipse
2. Configure Git on our Eclipse
user.name here is your username registered on https://github.com
user.email is the email you bind on github. You can configure user.name here
3. Create a new project and submit the project to the local warehouse
So far, we have successfully created the GIT repository, but the folder is in an uncommitted state, similar to SVN, with a question mark on the folder.
Next we need to submit the code to the local repository.
At this time, we may report an error when submitting:
There are no staged files.
The solution is as follows:
At this time, when we click submit, we can see the correct interface:
After submitting, we found that the familiar little yellow bucket appeared! This means that you have successfully submitted to the local repository.
4. Submit the local code to the remote GIT repository
First open your own GitHub and create a repository:
After clicking Create repository, our repository is created. Then we see an interface with an HTTP address, as shown below, this is the remote warehouse address of your http protocol
After the preparation is complete, we open eclipse to upload the project to the remote warehouse:
The following is your GITHUB account password
In this way, we submit the code to the remote repository. Let's open github to see:
OK, we have successfully uploaded.
Original link: https://blog.csdn.net/fan510988896/article/details/56277822