Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

git pull VS git pull --no-rebase

What is the difference between git pull and git pull --no-rebase ?

In my understanding the git pull by default does a fetch then a merge. So the no-rebase means merge and therefore these two commands are exactly identical! Is that correct?

like image 632
JeanDujardin Avatar asked Apr 24 '26 05:04

JeanDujardin


1 Answers

When you have pull.rebase set to true in your config, the default action upon git pull is a rebase.

(If you're unsure about how to look for it in your config, it's git config --get pull.rebase )

In this case, the --no-rebase option is a one-time exception to your personal default, resulting in a merge-pull.

like image 154
Romain Valeri Avatar answered Apr 26 '26 18:04

Romain Valeri



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!