Team development using Git (eclipse edition)

Simple way to develop a team in Eclipse (current stage)

Team development in Eclipse is common, but at the time of writing this Due to the problem of infectious disease control, all developers are often developing in a remote environment.

When that happens, team development will be very difficult without Git's ** pull **. At this stage, when the team says, "Please develop the team remotely from tomorrow!", I will explain how to simply work, including my own thoughts.

It is carried out in the following eclipse environment.

The conclusion is as follows.

--Determine a repository administrator and manage the master branch. --Each developer has its own branch --Each developer always pulls before committing

Below is my simple development method

image.png

The above figure is a little hard to see, but it is divided into 10 steps.

I will explain how to use eclipse step by step below.

① How to manage Eclipse project with Git (not required when importing)

Right-click the project and click "Team"-> "Share Project" in the figure below. Select Git,

On the next screen, "Use or create a repository for the project's parent folder" Check the box and press the Finish button

② How to create a remote repository

Log in to Github, click "new repository" on the upper right, and follow the on-screen instructions to create it. image.png

③ How to handle remote repository in Eclipse

Clone the Git repository from the Git repository view and click Add to this view. image.png

④ How to commit to Git's remote repository from Eclipse

When you have finished editing the source code, select Project Team → Commit.

Don't forget to commit unstaged changes with the green "++" in the figure image.png

⑤ How to add the cloned remote repository to Eclipse

Project Explorer (a view of projects such as Java and Java EE displayed in a tree) Right-click on and select Import → Import

Select "Project from Git" on the import screen image.png

Enter the clone source URI in the existing repository or clone URI. (Figure is when importing local repository) image.png image.png

Select "Import existing project" and select Next to select the target project and complete image.png

image.png

⑥ How to cut a new branch on Eclipse (and check out)

From the view of the Git repository, right-click the branch as shown below, switch → new branch is possible, image.png

It is automatically checked out to the created branch. If you want to check out at another branch Right click on the branch and select Checkout image.png

⑦ How to fetch the latest remotely (fetch)

Right click on the project and select Team → "Fetch from origin"

⑧ How to merge the latest remote and developed source code (pull)

** If you use Github, please make a pull request and then pull **

Right click on the project and select Team → Pull Pull (U) up to date from origin / master The pull below it will pull from your favorite branch image.png

⑨ How to delete a commit when it fails

Right click on the project and select Team → Reset

⑩ Solution in case of conflict

Synchronize from the Team Sync view. image.png

change history

--2020/4/20 Newly created

Recommended Posts

Team development using Git (eclipse edition)
Streamlining Web system development using docker-compose and Git
Allow development in Eclipse environment using iPLAss SDK
DSL development using ANTLR 4.7.1
Modern Java Development Guide (2018 Edition)
[Team development] Migration update work
Java development environment (Mac, Eclipse)
[Eclipse plug-in development] Javadoc acquisition
First Java development in Eclipse
Using Amateurs UML in Eclipse
Eclipse 4.8 introduction memo (Plugin edition)