Skip to the content.

Git Merge vs. Git Rebase

What are the differences?

When we merge changes from one Git branch to another, we can use git merge or git rebase. The diagram below shows how the two commands work.

𝐓𝐡𝐞 𝐆𝐨𝐥𝐝𝐞𝐧 𝐑𝐮𝐥𝐞 𝐨𝐟 𝐆𝐢𝐭 𝐑𝐞𝐛𝐚𝐬𝐞 Never use it on public branches!

Git Merge vs. Git Rebase