1

Maybe an odd situation, but I have fiddled with this myself and searched several forums without any luck. Is this even possible without setting up a local environment and cloning the repo?

For some context: In our company, we have several non-devs who make small updates to a project using the Web IDE from Gitlab. From time to time, they will need to update their feature branch with new changes from master before being able to merge. I never imagined that doing something like this would prove to be so difficult, especially considering how important this step can be.

I know how to do this with git commands in a terminal, but in order to even use the terminal in Gitlab's Web IDE you first need to setup a remote environment.

I also know that several popular IDEs allow users to do this with simple button clicks, but we would like to avoid having to setup local environments for all of our end-users and forcing them to change their workflow for something that they only need to use a few times a month.

6
  • 1
    Create a merge request, review, merge. Am I missing or misunderstanding something? Commented Jul 9, 2024 at 13:18
  • We have CI pipelines set up to make sure these MRs cause as few bugs as possible, and sometimes this means that the feature-branch needs to be up-to-date with master. AFAIK the only way to do this would be the standard way ie clone the branch locally, merge/rebase master to the feature branch, and push those changes into the MR. If the devs are having to do this for other people, then that means 1 less person who can approve the MR (as per our approval rules). Hope that explains it a bit more Commented Jul 9, 2024 at 14:00
  • You should never rebase master. I'm inclined to classify your problem as a people/policy problem and not a technical one. Merging in GitLab works via merge requests. Merging (or rebasing) locally is simple enough. Commented Jul 9, 2024 at 14:15
  • 1
    "I am talking about merging changes from master -> feature-branch." So create a merge request of branch "master" and target "feature-branch". Also, if you have a merge quest and there are no conflicts, you should be able to type /rebase as a comment quick action. Actually, I am going to post this as an answer, it might help your case Commented Jul 9, 2024 at 14:45
  • 1
    You don't have to create new merge request, you can (and probably should) type /rebase in your existing MR. Why would you want to open a new MR? (I don't think that's even possible with GitLab). My comment read "if you have a merge [re]quest", it didn't say anything about creating a new one. Commented Jul 9, 2024 at 15:27

2 Answers 2

3

Maybe GitLab quick actions could help in your case. In your merge request, type /rebase in the comment field and submit (either by clicking the submit button or by pressing Ctrl-Enter). Given that there are no conflicts, the branch will be rebased onto the target branch of the merge request. If there are conflicts however, your only choice is to rebase (or merge) locally to resolve the conflicts.

Sign up to request clarification or add additional context in comments.

Comments

0

I don't know when it was implemented (but I just discovered it). Near the button to "Merge" or "Set automatic merge" there small underlined text "Rebase source branch". I hope it helps.

enter image description here

(or type "/rebase" in a comment)

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.