Web Testing/Automation/CodeReviewProcess: Difference between revisions

Jump to navigation Jump to search
Line 51: Line 51:


== Squashing commits before merging a feature branch ==
== Squashing commits before merging a feature branch ==
There are two suggested ways of squashing commits locally in order to reduce the number of commits in a branch to one before merging the branch into master. The first one, ''interactive rebase'' is likely the simplest, so we suggest you try that first.
=== Using interactive rebase to squash commits ===
You will use Git's interactive rebase feature to take all of the commits that are currently in the branch and ''squash'' them into a single commit.
''Note:'' If all the commits are ones that were added only to the feature branch then you should not run into any issues. If your feature branch includes commits from master that were pulled in during development of the feature, you could encounter conflicts when doing the interactive rebase which you'll need to address. In this case it might be simpler to go with the second option ''merge with --squash''.
# Determine how many commits need to be combined. You can do this by typing the
Confirmed users
425

edits

Navigation menu