Git Rebasing: Difference between revisions
Jump to navigation
Jump to search
Line 22: | Line 22: | ||
==Moving a Branch Forward== | ==Moving a Branch Forward== | ||
You are working on a feature branch, named "A", created when the "develop" branch HEAD was commit "ef5". You committed work on the "A" branch, and your commit is "3ba". After a while, you want to apply your changes on the HEAD of "develop", since "develop" has evolved and you want to try | |||
On branch task/of/PLAT-15252 | On branch task/of/PLAT-15252 |
Revision as of 16:59, 5 August 2019
Internal
Overview
Be aware that rebasing rewrites history.
Simple Rebasing
Only two branches are involved.
More Complex Rebasing
Rewriting History
Rebasing removes the commits that have been applied to the target branch from repository.
Practical Use Cases
Moving a Branch Forward
You are working on a feature branch, named "A", created when the "develop" branch HEAD was commit "ef5". You committed work on the "A" branch, and your commit is "3ba". After a while, you want to apply your changes on the HEAD of "develop", since "develop" has evolved and you want to try
On branch task/of/PLAT-15252 Your branch and 'origin/task/of/PLAT-15252' have diverged, and have 164 and 1 different commits each, respectively. (use "git pull" to merge the remote branch into yours)