on github, there are 3 options when branches are merged. the difference is here What's the Difference Between the 3 Github Merge Methods?
some good practices: (image the branch structure is feature->development->master->release)
Rebase and merge
is not an option for most organizations. This command normally requires the permission ofpush -f
, which can be a source of trouble- when merging development to master, pls always choose
Create a merge commit
. Otherwise, the next merge will require you to sync between development and master - when merging feature branch to development, both
Create a merge commit
andSquash and merge
can be used- if it's a big change, and the change made in each commit is possible to be rolled back or is desired to be tracked, adopt
Create a merge commit
- in most cases, pls use
Squash and merge
- if it's a big change, and the change made in each commit is possible to be rolled back or is desired to be tracked, adopt