V
V
vism2018-11-28 00:05:16
git
vism, 2018-11-28 00:05:16

How can I prevent the merge of the staging branch into the master branch?

How can I prevent the merge of the staging branch into the master branch?
Workflow is like that.
1. For the task, I create a task_*** branch from master.
2. To check, I merge task_** into staging
3. When everything is checked, I merge task_** into master
I want to disable the possibility of merging staging into master to avoid possible curvature.
Also, if, for example, we accidentally merged the staging branch into master, how can this jamb be rolled back.
In fact, a bunch of time-scattered commits appeared in master, but I don’t know how to roll back.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
J
jcmvbkbc, 2018-11-28
@jcmvbkbc

Also, if, for example, we accidentally merged the staging branch into master, how can this jamb be rolled back.

It only looks like this because by default git log sorts commits by time. But the contents of the merged branches are not actually shuffled anywhere, git resetor git reverta commit corresponding to the merge undoes all commits from the merged branch.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question