Merging commits
Squashing is the process of merging multiple commits into a single commit.
If you run the git merge command and the --squash
option, a new commit will group all of the commits from a branch together. That commit can then merge into the current branch.
![Use git merge --squash to unify commits from a feature/topic branch into a single commit to be merged into your current branch. Diagram using the squash command.](/static/b5e0bf82199dd485cf522cf54d0671a2/5a190/01.png)