Git Rebase — A Powerful Command Brings Your Git Skills To The Next Level (Part II)

It is not just a command for merging branches, it can also manipulate your commits history.

Allie Hsu
Coder Life

--

Photo by Git

In previous, we discussed how git rebase changes git history to make it clean and tidy. If you haven’t read it yet or want to review it again, please check the link here: Git Rebase — A Powerful Command Brings Your Git Skills To The Next Level (Part I)

In this article, will first compare the differences between Git Merge and Git Rebase, and then will tell you how to use git rebase to merge branches step by step.

Git Merge vs Git Rebase

They are designed to integrate changes from multiple branches into one. Although the ultimate goal is the same, the two methods are implemented in different ways. Before starting to use git rebase to merge the new commits into the develop branch, we should first know how it works, and what is the difference when it compares with git merge.

Git Merge

  1. we have DEVELOP branch that has two commits, then checkout to…

--

--

Allie Hsu
Coder Life

A tech enthusiast who is keen to develop new skills