Gitflow: Should I squash commits when merging from a release branch into master?

后端 未结 3 1658
梦毁少年i
梦毁少年i 2021-02-05 01:20

I am going to merge my release branch to master and I am wondering if I should squash the commits from develop into a single merge commit when merging into master.

Gener

3条回答
  •  悲哀的现实
    2021-02-05 01:56

    The master branch is used to maintain a record of releases, so each commit should represent a squashed set of changes from the development branches that made up the release build.

    Squashing the commits makes it much easier to see what changes went into a release and to create hotfix branches from a release commit when necessary. Tag each squashed commit with the release version number.

提交回复
热议问题