UST interview question

How does git rebase work?