How to Rebase
Today, I had to rebase my feature branch to include the latest changes from the development branch.
Rebasing allows you to modify the commit history in a way that presents a more linear order of commits. When you rebase, you combine the most recent updates from a branch, in my case development, followed by your feature branch's commits, moving your feature branch to the head of the commit history and also ensuring that your work is built upon the latest changes.
Here is an overview of the steps:
- git checkout development or (master/main etc)
- git pull
- git checkout my_branch
- git rebase development
- git rebase --continue (or --skip)
- ... resolve all conflicts ...
- :wq to get out of vim
- git push -f origin my_branch
Noice!!