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
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.
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
Log in to Github, click "new repository" on the upper right, and follow the on-screen instructions to create it.
Clone the Git repository from the Git repository view and click Add to this view.
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
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
Enter the clone source URI in the existing repository or clone URI. (Figure is when importing local repository)
Select "Import existing project" and select Next to select the target project and complete
From the view of the Git repository, right-click the branch as shown below, switch → new branch is possible,
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
Right click on the project and select Team → "Fetch from origin"
** 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
Right click on the project and select Team → Reset
Synchronize from the Team Sync view.
--2020/4/20 Newly created
Recommended Posts