Everyone uses the same warehouse for collaborative development, branch development functions, after development is completed, establishedmerge request,进行code review, and finally merged into the develop branch
You can also merge it forkmainrepo, 开发完毕后,建立pull request到mainrepo by the person who manages the code
Well, this really doesn’t take advantage of branches. There should not be only one mainrepo branch. Development, feature, hotfix branches, etc. should be separated according to needs. This is developed on the corresponding branch.
Of course it’s okay to do this. Your boss probably has his reasons for doing this. However, this method of management is very centralized and does not conform to the distributed idea of git, so using git is not very suitable.
Create a dev library as a test environment library, and only the boss or designated manager can merge it.
Each developer creates his or her own branch, then pushes it to the remote factory, and then the boss or manager goes to dev merge and pushes the upstream branch.
Two ways:
Everyone uses the same warehouse for collaborative development, branch development functions, after development is completed, established
merge request
,进行code review
, and finally merged into the develop branchYou can also merge it
fork
mainrepo
, 开发完毕后,建立pull request
到mainrepo
by the person who manages the code
Benefits of using the second method:
Protection
mainrepo
, 所有的合并操作必须使用pull request
, cannot simply mergemainrepo
are more concise and do not contain redundant branchesIndividuals maintain branches in their own private warehouses, and there will be no duplicate names when creating branches
I personally emphasize on contributing code and contribute more code to
mainrepo
Well, this really doesn’t take advantage of branches.
There should not be only one mainrepo branch. Development, feature, hotfix branches, etc. should be separated according to needs. This is developed on the corresponding branch.
Of course it’s okay to do this. Your boss probably has his reasons for doing this.
However, this method of management is very centralized and does not conform to the distributed idea of git, so using git is not very suitable.
The steps I understand
Boss Creation Library
Master designated boss can merge
Create a dev library as a test environment library, and only the boss or designated manager can merge it.
Each developer creates his or her own branch, then pushes it to the remote factory, and then the boss or manager goes to dev merge and pushes the upstream branch.