Skip to content

Commit 7a32669

Browse files
committed
Add a recipe for merge reverts.
1 parent f5cca16 commit 7a32669

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

work/flow.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -553,6 +553,15 @@ If this occurs, the merge may be reverted by anyone who notices the breakage and
553553
Such a fix need not use a brand new ticket and ticket branch.
554554
Instead, it can be performed on a "hotfix" branch named after the original ticket that was merged, typically ``tickets/DM-NNNNN-hotfix``.
555555

556+
If a merge revert is required, the following process should be followed:
557+
558+
- Create a new "revert" branch named ``tickets/DM-NNNNN-revert``. This is necessary because no pushes are allowed directly to the ``main`` branch.
559+
- Revert the faulty merge commit on the branch. ``git revert -m 1 {merge hash}``. ``-m 1`` indicates that the first parent is the "mainline" code that should be kept.
560+
- Push the branch, create a PR, and merge it as normal.
561+
562+
The commits on the reverted branch cannot be re-merged from that branch as is, even if fixes have been applied.
563+
The branch should instead be rebased on ``main`` after the revert, according to our normal process.
564+
556565
.. _workflow-announce:
557566

558567
Announce the change

0 commit comments

Comments
 (0)