1. Introduction
2. Installation
3. Configuration
4. Use
5. Supplementary instructions
Reference: http://yufenfei.iteye.com/blog/1750124
1. Introduction
Egit is a git plugin on eclipse.
2. Installation
Egit Plugin Address: http://download.eclipse.org/egit/updates
OK, then the next successive default installation will be ready, after installation to restart Eclipse
3. Configuration
Preparatory work: Need to register an account on https://github.com
Preferences > Team > Git > Configuration
The user.name here is your registered user name on the https://github.com.
User.email is your mailbox on GitHub. Configure the User.Name here
4. Use
Submit the Local repository:
1, new project Git_demo, and new Helloworld.java class
2. Submit the Git_demo project to the local warehouse, as
In this step, the Git repository is created successfully. But the folder is in the untracked state (the symbol "?" in the folder.) ), we need to submit the code to the local repository, as
OK, so the code is submitted to the local repository
To submit a remote repository:
1. Preparation: Create a warehouse on https://github.com
Click "Create Repository", OK, so the repository on GitHub is created.
Note After creating the remote repository, click to go in, you can see an HTTP address, such as the red box, this is the remote Warehouse address of your HTTP protocol
2, the preparation of the work done, then start to submit the code to the remote repository
OK, so commit the remote git is done, you can check the https://github.com in the code has been submitted
The problem of attention
If this is the first time to commit, start by building the same warehouse locally, called the Local warehouse.
The second step: Commit locally commits the update to the local repository;
The third step: Pull the server-side updates to the local warehouse for consolidation, and finally push the consolidated local repository to the server side, so that a remote commit is made.
If the same goes for a non-first-time submission
The first step: Update the modified code commit operation to the local repository;
Step two: The third step: Pull the server-side updates to the local repository for consolidation, and finally push the consolidated local warehouse to the server side
3. Clone Remote repository:
5. Supplementary explanation:
The same is true for the GIT server's eclipse access: push to Git server is configured as follows:
Prerequisites:
Need to create a new Python.git repository on the GIT server and then use SSH push to the server
Error Resolution:
Solution:
Use git--bare init when initializing remote repositories do not use git init