Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

No Merge Request Button for a branch in Gitlab

Tags:

git

gitlab

Newbie in using Git and Gitlab over here

I have a Gitlab setup whereby I have the following branches for a project

devevlopment (dev) -> consolidation (cons) -> testing (test) -> production (prod) -> master

I would like to merge code on "dev" to "cons".

I see that there is not "Merge Request" button available for "dev"

Why is this the case?

TIAenter image description here

Update

Thanks all for the inputs. I wound up :

  1. Creating a project/Repository in a group called MASTER
  2. Forking the project/Repository in group MASTER and placing in group PRODUCTION.
  3. Continued to do forks that would represent other deployment areas (i.e. test, cons, dev)

This seems to have produced the effect I was looking for - that way - I no longer have branches with :dev, test, prod, etc. under one Repository/Project.

like image 775
Casey Harrils Avatar asked Sep 17 '25 21:09

Casey Harrils


1 Answers

The Merge Request buttons on that screen create a request to merge into your default branch. dev is your default branch, so no button exists.

If you go to your Merge Requests tab you should be able to create a merge request from your default branch:

  1. Navigate to the Merge Requests tab
  2. Click New merge request
  3. Select your dev branch as the Source branch
  4. Select your target branch
  5. Click Compare branches and continue
  6. Complete additional details on the New Merge Request screen
  7. Click Submit merge request

Alternatively, as the comments above suggest you could also do a regular Git merge on your local copy and push back up to GitLab.

like image 157
Chris Avatar answered Sep 19 '25 13:09

Chris