10

Is there a Mercurial equivalent of git pull --rebase?

tshepang
  • 12,111
  • 21
  • 91
  • 136
usha
  • 28,973
  • 5
  • 72
  • 93
  • For followers looking for "the mercurial equivalent of `git pull`" (the normal merge way -- non rebase) it's `hg pull && hg update` see http://stackoverflow.com/a/15244773/32453 – rogerdpack May 21 '14 at 16:59
  • 1
    Or a little shorter: `hg pull --update` – yorch Jun 25 '15 at 00:28

1 Answers1

13

Try hg pull --rebase. Mecurial's pull is git's fetch, and git's fetch is mercurial's pull, but when you're rebasing you're updating the working dir either way, so hg pull --rebase is your guy.

NOTE: Because rebase alters history, it's disabled by default. You can turn it on (no need to download, you already have it) by adding the following in the configuration file:

[extensions]
rebase =

(more info)

Ry4an Brase
  • 78,112
  • 7
  • 148
  • 169