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.
---
After the Merge Request has been reverted, the **Revert** button will not be
available anymore.
## Reverting a Commit
## Reverting a Commit
You can revert a Commit from the Commit detail page:
You can revert a Commit from the Commit details page:
![Revert commit](img/revert_changes_commit.png)
![Revert commit](img/revert_changes_commit.png)
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:
---
Similar to 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
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:
After the Commit has been reverted, the **Revert** button will not be available
anymore.
Please note that when reverting merge commits, the mainline will always 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 example to revert a merge commit using the second parent as the
mainline:
```bash
git revert -m 2 7a39eb0
```
```
# Revert a merge commit using the second parent as the mainline