Git rebase guide

https://speakerdeck.com/ewoodh2o/a-sane-git-workflow

Slide 41 onwards has a great explanation of rebase.

If you're on a feature branch, use git rebase to get all the changes from the main branch.

These will be added to your feature branch behind all your commits - your work remains the most recent items on your branch.