Git rebase re-applies commits from current branch on top of another branch. Thus creates a linear history.

Let’s start with this repository.

image

 

Current branch is dev. After running $ git rebase master. The commits are lined up.

image

 

Compare to merge, if run $ git merge master. The result will be non-linear.

image

Last edited Oct 26, 2011 at 2:21 AM by yysun, version 2

Comments

No comments yet.