Information Technology Reference
In-Depth Information
8-11. Squashing a branch
Problem
You have just finished the work on a new feature. Your work consists of three commits
stored in a dedicated branch. You want to squash these commits and add them as a one
new commit on top of your master branch.
This task is presented in Figure 8-13 . The feature branch contains the three revi-
sions f1 , f2 , and f3 . You want to squash them into a single revision that will appear
in master branch.
Figure 8-13 . Squashing a branch
Solution
Clone the repository from Recipe 6-4:
$ cd git-recipes
$ git clone-with-branches 06-04 08-11
$ cd 08-11
 
 
Search WWH ::




Custom Search