Information Technology Reference
In-Depth Information
Figure 7-1 . The repository from Recipe 7-1 before rebasing (a) and after rebasing (b)
Solution
Clone the repository from Recipe 6-4 with branches:
$ cd git-recipes
$ git clone-with-branches 06-04 07-01
$ cd 07-01
and then follow these steps:
1. Checkout the feature branch with the $ git checkout fea-
ture command.
2. Rebase the feature branch onto the master branch with the $ git
rebase master command.
3. Checkout the master branch with the $ git checkout master
command.
How It Works
The transformation performed by $ git rebase master can be described as ap-
plying the changes introduced by the commits from the current branch at the top of an-
other branch. This is depicted in Figure 7-2 .
 
Search WWH ::




Custom Search