From 6f61cbd162582c78a2c3e197f34a63e4543c9b1b Mon Sep 17 00:00:00 2001 From: Sytse Sijbrandij Date: Mon, 22 Sep 2014 13:10:13 +0200 Subject: [PATCH] Add wisdom about reverting a revert merge. --- doc/workflow/gitlab_flow.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/workflow/gitlab_flow.md b/doc/workflow/gitlab_flow.md index 519111529a6..7726365e1ef 100644 --- a/doc/workflow/gitlab_flow.md +++ b/doc/workflow/gitlab_flow.md @@ -178,7 +178,9 @@ After you merge multiple commits from a feature branch into the master branch th If you would have squashed all the commits into one you could have just reverted this commit but as we indicated you should not rebase commits after they are pushed. Fortunately [reverting a merge made some time ago](http://git-scm.com/blog/2010/03/02/undoing-merges.html) can be done with git. This however, requires having specific merge commits for the commits your want to revert. -This is a good reason always to create a merge commit when you merge manually with the `--no-ff` option. +If you revert a merge and you change your mind, revert the revert instead of merging again since git will not allow you to merge the code again otherwise. + +Being able to revert a merge is a good reason always to create a merge commit when you merge manually with the `--no-ff` option. Git management software will always create a merge commit when you accept a merge request. # Do not order commits with rebase -- GitLab