conventionalcommits.org icon indicating copy to clipboard operation
conventionalcommits.org copied to clipboard

Merge Commits

Open dsbert opened this issue 2 years ago • 2 comments

Is there any recommendation for how merge commits should be formatted?

My team uses gitlab, which generates merge commits with the following default template.

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

%{title}

%{issues}

See merge request %{reference}

I was considering the following.

merge: '%{source_branch}' into '%{target_branch}'

%{title}

%{issues}

Merge-request: %{reference}

dsbert avatar May 24 '22 14:05 dsbert

Hey @dsbert ! merge commit should not exist IMHO :)

I do suggest you take a look at the rebase merge, which fixes the issue of having merge commits.

damianopetrungaro avatar May 24 '22 14:05 damianopetrungaro

In GitLab you can also change the default to Fast-forward merge which will rebase as mentioned above to stop those commits appearing.

image

MAHDTech avatar Jun 30 '22 02:06 MAHDTech

Closing this, @dsbert let me know if you have any other doubt!

damianopetrungaro avatar Sep 07 '22 21:09 damianopetrungaro