diff options
author | Achilleas Pipinellis <axilleas@axilleas.me> | 2016-06-21 13:28:50 +0200 |
---|---|---|
committer | Achilleas Pipinellis <axilleas@axilleas.me> | 2016-06-21 13:28:50 +0200 |
commit | 24ad2f4f0d9e8ebfd8133a572f29e52b74cd7dd5 (patch) | |
tree | 056c6dc55069e322db64875a1d16a65293a10ed8 /doc/user/workflow/revert_changes.md | |
parent | 0d287b06a6fa7a373df03378f9f1a048e5890a4f (diff) | |
download | gitlab-ce-documentation_restructure.tar.gz |
Restructure documentationdocumentation_restructure
The big plan in motion, see https://gitlab.com/gitlab-org/gitlab-ce/issues/3349
Diffstat (limited to 'doc/user/workflow/revert_changes.md')
-rw-r--r-- | doc/user/workflow/revert_changes.md | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/doc/user/workflow/revert_changes.md b/doc/user/workflow/revert_changes.md new file mode 100644 index 00000000000..399366b0cdc --- /dev/null +++ b/doc/user/workflow/revert_changes.md @@ -0,0 +1,64 @@ +# Reverting changes + +_**Note:** This feature was [introduced][ce-1990] in GitLab 8.5._ + +--- + +GitLab implements Git's powerful feature to [revert any commit][git-revert] +with introducing a **Revert** button in Merge Requests and commit details. + +## Reverting a Merge Request + +_**Note:** The **Revert** button will only be available for Merge Requests +created since GitLab 8.5. However, you can still revert a Merge Request +by reverting the merge commit from the list of Commits page._ + +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. + +## Reverting a Commit + +You can revert a Commit from the Commit details page: + + + +--- + +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 +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 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 +``` + +[ce-1990]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/1990 "Revert button Merge Request" +[git-revert]: https://git-scm.com/docs/git-revert "Git revert documentation" |