DEV Community

Cover image for GIT: rebase VS merge (simple)
Kristiyan Velkov
Kristiyan Velkov

Posted on • Edited on

6 2 2 2 3

GIT: rebase VS merge (simple)

A short and simple explanation about git rebase vs git merge.

Image description

What Is Git Rebase?

Image description

  • git rebase is a powerful Git command that allows you to incorporate changes from one branch into another. It is often used to update a feature branch with the latest changes from the main branch before merging it back. Essentially, it allows you to replay a series of commits on top of a different commit.

What Is Git Merge?

Image description

  • git merge command is used in Git to integrate changes from one branch into another. It allows you to combine the changes made in one branch with the changes in another branch, resulting in a new commit that represents the merge of both branches.

Differences between merge and rebase?

  • The resulting tree structure of the history (generally only noticeable when looking at a commit graph) is different (one will have branches, the other won't).

  • Merge will generally create an extra commit.

  • Merge and rebase will handle conflicts differently. Rebase will present conflicts one commit at a time where merge will present them all at once.

Image description


Image description


Usefull Links


Image description

linkedin


Image description

If you like my work and want to support me to work hard, please donate via:

Revolut website payment or use the QR code above.

Thanks a bunch for supporting me! It means a LOT 😍

Image of Timescale

Timescale – the developer's data platform for modern apps, built on PostgreSQL

Timescale Cloud is PostgreSQL optimized for speed, scale, and performance. Over 3 million IoT, AI, crypto, and dev tool apps are powered by Timescale. Try it free today! No credit card required.

Try free

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay