Information Technology Reference
In-Depth Information
$ git rebase a b
If you skip the second parameter, HEAD will be used. Thus the commands:
$ git rebase a
$ git rebase a HEAD
are equivalent. To rebase the feature branch onto the master branch, as in this re-
cipe, you can:
• Change the current branch to feature and use one parameter for rebase
as in:
$ git checkout feature
$ git rebase master
• Use two parameters for rebasing—your current branch is not important
then:
$ git rebase master feature
Whichever is the case, feature is the current branch after successful rebasing.
7-2. Manually rebasing divergent
branches
Problem
To get a deeper insight into rebasing, you want to perform the same transformation as
in Recipe 7-1 without using the $ git rebase command. In this recipe you would
like to split rebasing into two operations: creating patches and applying them. Working
this way, the patches can be created by one developer, emailed, and then applied by an-
other developer.
Solution
Search WWH ::




Custom Search