use git plugin to upload code to github under Eclipse
- Install git under 1.eclipse
Under normal circumstances, Eclipse comes with a git plugin, so you can skip to the last small step of steps 1 and configure Git. If it's tragic that you don't see git in eclipse, then it's okay to install a git plugin. There are several ways to install the plug-in from Eclipse, where you'll choose the most common installation that describes the Git plugin. Click Help->install New software->add.
Enter the plug-in name (custom), and the plug-in address (http://download.eclipse.org/egit/updates/).
Select the plugin and click Next->next->i accept......->finish.
With git, we also need to have a simple configuration of git. Window->preferences->team->git->configuration, click Add Entry, configure the email and name, and of course some other information, when the code is submitted, This information is automatically read and submitted.
- 2. Register your GitHub account
If you are a long-time user of GitHub, the project Fork&star number of large gods, then (joking, the great God will not see this ⊙﹏⊙). If you're just getting started with GitHub and have your own GitHub account, you can go straight to step 3. If you do not have a GitHub account, then the following steps you can refer to, very simple, for perennial in the major irrigation forum students, should be the second registration. Log in to the GitHub website (https://github.com), enter your username, email address, password, and click Sign up for GitHub.
Under normal circumstances we choose the free version, click Finish sign to complete the registration. User-related details can be configured by clicking Setting in the upper right corner.
- 3. Create a warehouse on GitHub
When you have your own GitHub account, after logging in, click New Repository, as shown: then enter repository name and write Description for your project, then click Create Repository below to complete the warehouse creation Built.
After the warehouse has been created successfully, you can see the following interface, click on HTTP, copy the address, which will be used later.
- 4.eclipse creating a local git repository
Select a project in Eclipse, right-->team->share project, choose Git, then enter the local warehouse name, and the local repository can be created successfully.
- 5.commit code to local git repository
Select the item you want to Commit, right-->team->commit,
Fill in the relevant commit message and select the Files you want to submit and click Commit. (You can also select Commit and Push here to go directly to the next step)
- 6.push code to GitHub remote repository
Select the item you want to Push, and right-click->team->remote->push.
URL Fill in step 3 get the HTTP address, User and Password fill in your GitHub account and password.
Source ref and Destination ref both select Master, click on the Add Spec, then click Finish to wait for the upload.
Log in to GitHub to view the newly submitted items when the upload is complete.
Note: After the submission is completed, if you want to disconnect, you only need to select the project, right-click to select Team->disconnect.
copy code from github using git plugin under Eclipse
- 1. Select or create a local warehouse
Open git view (window->show views), select Add an existing local git repository (above), display the Git repository you created earlier, click Finish. (Of course, choose Create a new local Git repository to have the creation of a fresh native repository).
- 2. Clone Warehouse to Local
Select Clone a Repository as shown ..., copy the project HTTPS Clone URL, and fill in the user name and password, and then go all the way next.
Then we can see the project in Git view and right-click on Import Porjects,import as General project.
several ways to install plug-ins under eclipse: a summary
- Manual Installation Method
The simplest way to do this is to unzip the compressed package downloaded by the plugin and copy the folder directly to the plugin directory under the Eclipse installation directory to restart Eclipse. Of course, this method brings a more troublesome problem is that when the plug-in installation, in the plugin directory is not good management, so there is a link method. Create a new link directory under the Eclipse installation directory (such as D:\eclipse), place the downloaded unpacked plug-in package under the specified directory (for example, E:\myplugin), and create a new link file under the link directory (D:\eclipse\link), such as G It.link, open with a text editor and write the following: path=e:\\myplugin\\ restart Eclipse. Some additional notes (from the network): 1. Plug-ins can be installed in more than one custom directory, respectively. 2. One custom directory can install multiple plugins. 3. The name and extension of the link file can be any name, such as Myplugin,yourplugin. 4. The link file can have multiple lines of path= plug-in directory, corresponding to multiple custom plug-in directories, each line of the path parameter will take effect. 5. There can also be multiple link files in the links directory, and the path parameter in each link file will take effect. 6. The plugin directory can also use a relative path, if we create the Myplugin directory in the Eclipse installation directory, such as the D:\eclipse directory (such as D:\eclipse\myplugin), you only need to set path=myplugin. 7. If the reboot is still not successful, you can try to use the configuration directory under the Eclipse installation directory (for example, D:\eclipse\ Confifuration) The rest of the files except the Config.ini file are cut to the desktop (the risk of deletion is large), and then try restarting again.
- Semi-Automatic installation method
Here is an example of the Git installation mentioned above. Click Help->install New software->add.
Enter the plug-in name (custom), and the plug-in address (http://download.eclipse.org/egit/updates/).
Select the plugin and click Next->next->i accept......->finish.
Some plugins need to be configured after installation, so they need to be configured in Window->preferences.
- Automatic Installation method
This approach requires Eclipse Marketplace plugin (click Help if Eclipse Marketplace is installed). If not installed, the Eclipse Marketplace plugin (where location is http://download.eclipse.org/mpc/indigo/) is first installed using the semi-automatic installation method above. After you have already owned the Eclipse Marketplace plugin, click Help->eclipse Marketplace to search for the plugin you want to install automatically. If you need to install the Python plugin, search for "Python", you can see the "PyDev" plug-in, click Install.
"Use Git to upload (download) code to (from) GitHub under Eclipse"