diff --git a/doc/workflow/revert_changes.md b/doc/workflow/revert_changes.md new file mode 100644 index 0000000000000000000000000000000000000000..079b92f8b10d619e69bd185e753fe9e2b0be9239 --- /dev/null +++ b/doc/workflow/revert_changes.md @@ -0,0 +1,36 @@ +# Reverting changes + +The new `Revert` button allows you to revert any changes introduced by a Commit or a Merge Request. + +## Reverting a Merge Request + +After the Merge Request has been merged, a `Revert` button will be available to revert the changes introduced by that Merge Request: + + + +You can revert the changes directly into the selected branch or you can opt to create a new Merge Request with the revert changes: + + + +After the Merge Request has been reverted, the `Revert` button will not be available anymore. + +It's important to mention that this new button will be only available for Merge Requests created since the **8.5** version. However you can still revert a Merge by reverting the merge commit from the list of Commits page. + +## Reverting a Commit + +You can revert a Commit from the Commit detail page: + + + +In the same way like reverting a Merge Request you can opt to revert the changes directly into the target branch or create a new Merge Request to revert the changes: + + + +After the Commit has been reverted, the `Revert` button will not be available anymore. + +Please note that when reverting merge commits, the mainline will allways be the first parent, if you want to use a different mainline then you need to do that from the command line, here is a quick sample: + +``` +# Revert a merge commit using the second parent as the mainline +git revert -m 2 commit_hash +``` diff --git a/doc/workflow/revert_changes/revert-commit-modal.png b/doc/workflow/revert_changes/revert-commit-modal.png new file mode 100644 index 0000000000000000000000000000000000000000..e94d151a2afe611b0f87c6c363ef644ab83dd94c Binary files /dev/null and b/doc/workflow/revert_changes/revert-commit-modal.png differ diff --git a/doc/workflow/revert_changes/revert-commit.png b/doc/workflow/revert_changes/revert-commit.png new file mode 100644 index 0000000000000000000000000000000000000000..d84211e20db9fbca1c390faff5f3a7a401cfa0c3 Binary files /dev/null and b/doc/workflow/revert_changes/revert-commit.png differ diff --git a/doc/workflow/revert_changes/revert-mr-modal.png b/doc/workflow/revert_changes/revert-mr-modal.png new file mode 100644 index 0000000000000000000000000000000000000000..9da78f84828f311a11cb3b88c42a270faa32bd84 Binary files /dev/null and b/doc/workflow/revert_changes/revert-mr-modal.png differ diff --git a/doc/workflow/revert_changes/revert-mr.png b/doc/workflow/revert_changes/revert-mr.png new file mode 100644 index 0000000000000000000000000000000000000000..7adad88463b3be50e7fbbed3a817575f9438dbb5 Binary files /dev/null and b/doc/workflow/revert_changes/revert-mr.png differ