Skip to main content
← All posts

Name your branch before you create the merge request

Creating a merge request or pull request from a card used to take the branch name and title we picked for you, and the button went away once the issue had one open. Plenty of teams name branches their own way, and plenty of issues need more than one change. Both now work.

What changed

You can edit the branch name and the title. The confirmation now has two fields, Branch name and Title, filled in with our suggestion. Keep them or change them before you click Create. The sentence below the fields names the branch as you type it, and the merge request or pull request is still opened as a draft. The description isn't editable: it still names the issue by number, because that is how the new one links back to the card.

A name that can't be a branch is caught as you type. A space, a .. or a name ending in .lock, for example, shows the reason under the field, and Create stays off until it is fixed. A blank title does the same.

An issue can have more than one. The button stays on cards that already have an open merge request or pull request, and the confirmation names the ones already open, such as "This issue already has !12 open." The suggested branch name skips names that are taken: if a branch with the usual name exists, we add -2, then -3 and so on, the way GitLab's own button does.

Protected names are refused before anything is created. If you type a name that the project's protected-branch rules wouldn't let you create on GitLab, or that a branch ruleset restricts on GitHub, the confirmation says so and nothing is made. Choose another name and try again. If we can't read those rules, only the suggested name can be used, and the confirmation tells you why.

Two people, one branch. If someone else creates from the same issue while your confirmation is open, you get theirs rather than a second one, and the confirmation says it already existed.