Information Technology Reference
In-Depth Information
Problem
You want to copy a revision from one branch to another. The transformation you have
in mind is presented in Figure 8-12 . Your master branch contains a revision labeled
as m4 . You want to copy it to the feature branch.
Figure 8-12 . Cherry-picking revisions
Solution
Clone the repository from Recipe 6-4:
$ cd git-recipes
$ git clone-with-branches 06-04 08-10
$ cd 08-10
and then go to the feature branch with $ git checkout feature and copy
revision m4 with $ git cherry-pick master .
How It Works
The $ git cherry-pick command applies the patch defined by a revision given
as a parameter into your current branch.
 
 
Search WWH ::




Custom Search