I assume that this question looks almost like a few others, but I've tried around 7 approaches from answers like Delete last commit in bitbucket and How can I remove a commit on GitHub? , but unfortunately still didn't find the solution.
The situation: I wrote code in branch "exampleBranch", did around of 30 commits (with push) with diff in a lot of files (create new files, remove redundant, etc) so there are a quite lot of diff. On this step (say on commit with number 30) I did merge-request, and by some reasons continued to commit to this branch (but without pushing, so I have it only locally). Simultaneously another person have done the code review of the pushed 30 commits and asked me to divide the code in MR, and the code that was written after 30th commit.
So absolutely clear for me, that all my changes after 30th commit I'm able to get just by creating a new branch (say "anotherBranch") from the current local "exampleBranch". Is that true, right ?
But unclear point for me is how to remove (locally and remotely) all the commits after 30th (there are ~45+ additional commits) ? So finally in the branch should be only the data that is already cheked by reviewer.
If it's important we use gitlab.
Thanks in advance for your replies.