GitLab flow and code that doesn't make it to production

Hi there,

I read the article about GitLab flow and found it quiet interesting. At the moment we use a slightly different approach.

I’m curious about the following scenario:

  • the client want’s a new feature
  • the new feature is developed, tested, improved and somewhen deployed to master
  • the client reviews the new feature on the staging environment
  • for some reason the feature shouldn’t go to production (the department who ordered the feature changed their mind or other circumstances)

How would you revert these changes. As far as I can see there is no easy way to revert the merge request from the feature branch to the master branch, isn’t it?

It should be possible. You create another merge request which reverts the feature from staging. With this approach the feature is still in the history and it’s more clear why it was necessary to revert it. To make this more convenient, you can squash the feature into one commit before merging it with staging aka main/master.