conventional-commits / conventionalcommits.org

The conventional commits specification
https://conventionalcommits.org
MIT License
6.73k stars 520 forks source link

Merge Commits #454

Closed dsbert closed 1 year ago

dsbert commented 2 years ago

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}
damianopetrungaro commented 2 years ago

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.

MAHDTech commented 2 years ago

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

image

damianopetrungaro commented 1 year ago

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