Mastering Git by 2016

Mastering Git by 2016

Author:2016
Language: eng
Format: mobi, epub
Publisher: Packt Publishing


Advanced rebasing techniques

You can also have your rebase operation replay on something other than the target branch of the rebase with --onto <newbase>, separating selected range of revisions to replay from the new base to replay onto.

Let's assume that you had based your featureA topic branch on the unstable development branch named next, because it is dependent on some feature that was not yet ready and not yet present in the stable branch (master). If the functionality on which featureA depends was deemed stable and was merged into master, you would want to move this branch from being forked from the next to being forked from master. Or perhaps, you started the server branch from the related client branch, but you want to make it more obvious that they are independent.

You can do this with git rebase --onto master next featureA in the first case, and git rebase --onto master server client in the second one.

Fig 6: Rebasing branch, moving it from one branch to the other



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.