Information Technology Reference
In-Depth Information
$ cd git-recipes
$ git clone-with-branches 07-07 07-08
$ cd 07-08
and then rebase the feature branch onto the master branch with $ git rebase
master feature . You will obtain the repository shown in Figure 7-13 . Notice that
the feature branch doesn't contain the merge branch 'brave-idea' revi-
sion any longer.
Figure 7-13 . The repository from Figure 7-12 after $ git rebase master feature
How It Works
As you can see in Figure 7-13 , rebasing operates only on non-merge commits. All
merge commits are lost. Rebasing always produces a straight line of commits, without
bulbs or merges. In the case of branches with bulbs it doesn't necessarily have to be
what you expect. If you want to preserve merges and bulbs you cannot use a simple re-
 
 
Search WWH ::




Custom Search