[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Pytave - (probably mercurial) - - Question
From: |
Mike Miller |
Subject: |
Re: Pytave - (probably mercurial) - - Question |
Date: |
Sat, 4 Jun 2016 10:46:41 -0700 |
User-agent: |
Mutt/1.6.0 (2016-04-01) |
On Sat, Jun 04, 2016 at 22:45:42 +0530, Abhinav Tripathi wrote:
> Sorry, I was just asking about not having commits which are in remote
> bookmark.
> Say my remote bookmark is:
> S->H->L
> while my local bookmark is (maybe different name) :
> S->A->B
> .
> if A, B don't conflict with H, L can I somehow force push or merge the
> local bookmark into remote one?
I see, so I think you're relying on git's default behavior that `git
pull` does a fetch followed by a merge from the branch of the same name,
is that what you want to do here?
I would probably do a `git pull --rebase` in this scenario, because
those A and B changes have not yet been pushed, there's no reason to
have a merge.
So if that's what you are after, hg does not have such an "automatically
pull in changes and automatically merge my diverging branch heads"
approach. If you want to merge A and B onto H and L, you would do
hg pull default
hg update L
hg merge B
hg commit -m "Merged some changes" ## whatever message
In the Octave developers circle we prefer to do a lot more rebasing to
keep the history clean of unnecessary merges when possible, so I would
do this instead
hg pull default
hg update B
hg rebase --dest L
This will give a local history of "S->H->L->A->B" and you should be on
the new transplanted B commit. Now you can bookmark it however you want
and push it.
If this answers your questions, I think there's no need to reply to my
other mail.
--
mike