TIPS to start creating a single source for multiple people

Asked 2 years ago, Updated 2 years ago, 141 views

For example, if you want to create a single controller with multiple actions,
multiple
How can I create it without causing conflicts as much as possible?

The controller starts to create with no files.

git gitlab

2022-09-29 22:44

1 Answers


If you want to create a single controller with multiple agents for each action. How can I create it without causing conflicts as much as possible?

  • Making the controller layer a lightweight implementation to invoke the business logic library
  • Make sure to write UNIT tests for your business logic library
  • Make sure that the UNIT test is OK whenever you merge someone else's development assets.

git does not automatically merge conflicts unless multiple people modify the same line, which is quite
It will merge well.
In rare cases, strange merging can occur, so make sure that the UNIT test can detect it.

The rest is

  • Watch out for the granularity of git commits

I think it is also important.
When the first version of code is being added more and more, there is not much conflict and automatic merge solves it quite automatically
I have a lot to do, but
Refactoring modifies functionality and adds functionality when development begins from mid to late.
Conflicts at this time will be more difficult to resolve.

Easy-to-understand commit message and Don't stuff a single commit
That's it.

As is often the case,
When I was fixing the bug, I found another bug, so I fixed it together.
I found a typo in the comment while fixing the bug, so I fixed other places as well
It's easy to do things like that, but I'll be patient and commit correction and typo
I think we should separate them.

Debugging with Git


when something goes wrong, such as the example in the Binary Search section in
Identify a commit with a problem
You can read it and try it when you need it.

For git,
in development workflows such as git flow and pull requests There is also a strategy to develop in line with

Merge independent functional units between branches or
As for merging bug fix requests with pull requests,

When multiple developers develop similar code at the same time, I feel like it's not peeling.
Each developer frequently commits, pulls, and pushes the source code
in the same branch. I think it's better to develop it with a small difference.

If the team grows up and there is another team that is creating a completely different function, the team will be developed in a separate branch
I think it's better to merge branches regularly.

Detailed operations may vary depending on the team, but for your information...


2022-09-29 22:44

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.