How can I git pull –rebase but taking all remote changes?

I think what you want is this:

git pull --rebase -s recursive -X ours

But it doesn’t work (I’m using 1.7.0.4), even though the manpage says it should. I’m guessing this is due to the issue mentioned here.

Instead, you could use:

git pull -s recursive -X theirs

It works as expected, but you’ll get a merge instead of a rebase.

Also – note ‘ours’, rather than ‘theirs’ when using –rebase. From the git-rebase manpage:

[CLIP]… a rebase merge works by replaying each commit from the working branch on top of the upstream branch. Because of this, when a merge conflict happens, the side reported as ours is the so-far rebased series, starting with upstream, and theirs is the working branch. In other words, the sides are swapped. …[CLIP]

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)