How to solve the problem of inconsistent git code? Please see the details.

The

A colleague pulled the code locally for development at 7: 00. The
B colleague modifies the model layer (the underlying code) at 8: 00 and submits it to the server.
A colleague finally finished writing the upper layer code at 9 o"clock and submitted it to the server, when he found that the model layer code on the server had been changed beyond recognition, and did not match the upper layer code he had written that depended on this model layer, causing the code to be written almost in vain.
could you tell me how to solve this situation?
you can only be truly efficient if you use git to collaborate on development projects.


make and communicate


if you overcoincide with the code submitted by him, then this task assignment is problematic, and different people should not work on overlapping code in a large number of tasks at the same time. If it happens, it can only be solved by branch and rebase. If there is too much overlap and too much content refactoring cannot rebase, it is recommended that you choose the high priority code merge to master, and rewrite other tasks on the basis of communication


this is not a problem with git at all. The title says "git" means to force git to take the blame? If the people involved in the development don't want to be constrained, it's no use using any version of the tool!
if you have to talk about how to improve the binding force with git, then you can refer to the github pr model, so that one or a few people have the permission to accept pr, but this will increase the workload of these people, and the requirements of these people are relatively high, they need to be able to distinguish which code is acceptable!

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3876d-2c10c.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3876d-2c10c.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?