head problem (bitbucket) push -f

Uwe Brauer oub at mat.ucm.es
Thu Oct 19 08:38:21 UTC 2017


    > On Wed, Oct 18, 2017 at 1:20 PM, Uwe Brauer <oub at mat.ucm.es> wrote:


    > that looks mostly right to me, 
Thanks


    > I think all you need do in this case is:

    > hg up exam-sep-17;
    > hg pull;
    > hg merge;
    > `hg push -b .`

I just that command a while ago but forgot about it. Remind me, please,
what is the purpose of . ?


(google did not return anything useful at first glance.)

    > (note the . at the end is significant)

    >  except i'm not sure why you need the new
    > branch?


Well I created that new branch on my local repo and committed some
changes, so bitbucket forces me to push the new branch (which makes some
sense)

    > You are probably pushing from two sources (say a work computer and
    > then a home laptop)

right
    > You made some changes at "work" and your "laptop" doesn't know
    > about them.

    > it's a good practice to do a `hg in` prior to working on new stuff
    > to avoid merges just to see if remote knows about stuff that your
    > local doesn't.

Yeah I even tell this my collaborators for common repos, and then I
forget it myself. Sigh.

    > You also probably don't need to do hg pull -u. In fact it may just
    > confuse things. Your going to get a new head when you pull.

Well yes and no, sometimes I commit to the wrong branch and I thought
pull -u is a good way to avoid that, but now I am not so sure.

Uwe 




More information about the Mercurial mailing list