When we learn git merge, we can fast-forward a left-behind branch by the following steps:
Scenario: Assume we are in development branch, we want to fast-forward the master branch–which is 10 commits behind–into the development branch.
- git checkout master
- git merge development
By using rebase, we can use 1 step to archive the same effect:
- git rebase development master
It means checkout master branch and rebase master onto development.