Thoughtworks Interview Question

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