4

We have two branches staging and master.

We always push to staging first and then submit a merge request to merge staging with master.

We had an error on a recent merge and we reverted changes.

e.g.

  • new merge request - merge staging commit 204ee3a406432bde305ce680gg22650b2f25ef3 to master (staging includes error)
  • merge approved - master(showing error)
  • revert merge, creates a new branch revert-088d6dbf
  • new merge request, merge branch revert-088d6dbf into master
  • merge approved - master(back to original, no error)

The problem is i've corrected the error on staging branch. When i attempt a new merge request (staging to master), all of the changes of commit 204ee3a406432bde305ce680gg22650b2f25ef3 aren't being recognized. it says "0 changes"? I don't understand and the branch revert-088d6dbf is still there.

There is code on the staging branch that isn't on master, but when i attempt a new merge request, none of this code is recognized in changes.

What do i do? I normally just merge staging with master. This is first time i've dealt with a revert.

user892134
  • 3,078
  • 16
  • 62
  • 128
  • To me, it looks like you reverted (also?) the branch that you now try to merge into master, so there are no changes. You should probably just checkout the branch and manually look at the content. Then go back in the history of the branch to try and find a commit before the revert with the changes you need. However, the bigger issue seems to be with your general workflow. You are really not supposed to somehow create multiple branches for a single merge into master. I would recommend to carefully read GitLab's recommendations about the topic: https://docs.gitlab.com/ee/workflow/gitlab_flow.html – Thomas Kainrad Feb 13 '19 at 22:56
  • Your description is not enough to tell what is going on. You would need to describe whether you talk about your local master and staging branches or the remote ones in each step. Or show us the recent state of your repository as a rendered graph like here:https://stackoverflow.com/questions/1057564/pretty-git-branch-graphs – tkruse Feb 19 '19 at 12:39

0 Answers0