Overview
A rebase workflow is:
- Create a feature branch from main.
git checkout main
git branch feature
git checkout feature
- Make and commit feature work.
git add .
git commit -m "Add feature functionality"
- Allow main to receive newer commits through other work.
- Return to feature.
git checkout feature
- Rebase feature onto the updated main branch.
git rebase main
- Inspect the result.
git log --oneline
The log should show the newer main commits followed by the replayed feature commits.