Information Technology Reference
In-Depth Information
^`git merge-base feature brave-idea`
Using shell subcommands defined with back-tick operators, we don't have to copy/
paste the SHA-1 names of m3 and f3 as they are embedded.
Exploring the graph of revisions you may also find useful the command that pro-
duces the SHA-1 name of a commit with a given comment:
$ git log --format="%h" --grep=XXX --all
The above command takes into account all branches ( --all option) and searches
for revisions that contain the XXX string. Thanks to the --format parameter the out-
put contains only the shortened SHA-1 name.
7-5. Partial rebasing
Problem
You decided that the code introduced in the brave-idea branch in the repository
shown in Figure 7-10(a) is now ready to be shared with others. Therefore you want to
move the revisions b1 and b2 to the master branch. The repository you want to
achieve is shown in Figure 7-10(b) . A situation such as this can happen if during your
work on brave-idea your original idea evolves and becomes large enough to be
treated as independent feature.
 
Search WWH ::




Custom Search