Information Technology Reference
In-Depth Information
When the repository looks like Figure 7-4 , we apply the patches stored in the files
with the .patch suffix:
$ git am *.patch
The above command reproduces the commits f1 , f2 , and f3 using the HEAD
pointer as a parent. The repository now looks like Figure 7-5 .
Figure 7-5 . The repository from Figure 7-4 after applying patches with the $ git am *.patch command
The last step is to now change the feature branch. We want it to point to our cur-
rent revision. We can use $ git checkout command for this. However, the com-
mand $ git checkout -b feature will not work. The reason is quite obvious:
feature branch already exists. Still, we can force the checkout using the -B switch:
$ git checkout -B feature
The updated repository is shown in Figure 7-6 . The commits f1 , f2 , and f3 are
still available in the database as dangling revisions, but they are not show in the figure.
 
 
 
Search WWH ::




Custom Search