Article From:https://segmentfault.com/q/1010000011701551
Question:

My warehouse has two branches: develop and master branches.
developThe branch is submitted as follows

If the business requirement now requires merging more than one of these submissions into the main branch master, I’m currently usinggit cherry-pick <commit> Command merging.

I Know,git cherry-pick <commit>It’s a new branch in the master branch.commit Not develop branch submission

Now that functional development is complete, I need to merge the development branch into the master branch, and I find that the history is chaotic and duplicated.

Under such circumstances, how to keep the master branch submitted for clean history?

Answer 0:

No repetition.

You see multiple branches in the graphical interface at the same time, so there’s a sense of chaos, but when you look at a branch, there’s no duplication, there’s no chaos.

cherry-pick That is to repeat the same commit on different branch.

Or you can try Environment branches with GitLab flow.

Similar Posts:

Leave a Reply

Your email address will not be published. Required fields are marked *