0

Is there a way to make a default merge commit message in all projects including the newly created ones in a group instead of manually changing it per project?

I want my default merge commit message to include my previous commit description/body.

Merge branch '%{source_branch}' into '%{target_branch}'

%{title} - %{description}

%{issues}

See merge request %{reference}

Gitlab Commit message template This link only tells me to do it by project.

Ezz Redfox
  • 89
  • 1
  • 9
  • The templates you're talking about are a *GitLab* feature, not a Git feature. Git does have `git commit -t` and `commit.template`, but the details are different. I'd also add that doing this sort of thing for a real merge is discouraged, though for a squash "merge" it's not only not discouraged, there's [`git-fmt-merge-msg`](https://git-scm.com/docs/git-fmt-merge-msg) to do it for you! – torek Jun 10 '22 at 12:49

1 Answers1

0

A GitLab group can have file templates and Custom group-level project templates.

Try and create a project from a built-in template and see if you can define first that to include your commit.template.
But if not, that means those file templates do not include what you need (commit or merge request templates). In that case, they would need to be added on a project-by-project basis.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250