Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git merge or git rebase?

Tags:

git

I have read the git plain merge fits some cases while git rebase fits other cases when doing merges in Git.

But I don't see how a rebase can be a substitute for a merge. After rebasing a branch it still needs to followed by a merge which is simply more likely to be a fast forward merge. So as I understand Rebase is simply used to "guarantee" a fast forward merge - it is not a substitute for git merge. Correct?

like image 772
u123 Avatar asked Jan 19 '26 05:01

u123


1 Answers

That's basically it (or, at least, one reason to use rebase). It guarantees a fast-forward merge. (I also find it easier to fix conflicts when rebasing as opposing to merging, especially when using git rerere.)

like image 73
mipadi Avatar answered Jan 20 '26 22:01

mipadi



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!