Thoughtworks interview question

What happens when you do git merge and git rebase. How does graph change during these operations. Draw some examples.