Why did "hg push", push my local bookmark to remote?

Jaikiran Pai jai.forums2013 at gmail.com
Sat Feb 7 12:47:23 UTC 2015


On Friday 06 February 2015 08:38 PM, Bryan Murdock wrote:
> Basic mercurial is very simple.  A push command with no arguments will
> push every commit that is in your local repo that is not in the remote
> repo.  You can supply arguments to limit which commit will be pushed.
> The outgoing command shows you what would be pushed without actually
> pushing and it accepts the same arguments as push.  Think of outgoing
> as a push preview or a push dry run.
>
> hg push # pushes everything not in remote
> hg push -r . # pushes the current commit and any of its ancestors not in remote
>
> hg outgoing # lists all commits not in remote
> hg outgoing -r . # lists current commit and any of its ancestors not in remote
>
> With git you have to be explicit about what you want pushed, with
> mercurial you have to be explicit if you don't want to push
> everything.
>
> Also, keep in mind that a bookmark is not a commit (or list of
> commits).  It is a thing that *refers* to a commit.  Git branches are
> essentially the same thing (a reference to a commit), even though much
> of the git documentation blurs the line between a commit and the thing
> that refers to the commit.
>
> I hope that helps.
>
> Bryan

It does help. Thanks Bryan.

-Jaikiran



More information about the Mercurial mailing list