No changes are pushed when using hg-git

后端 未结 3 398
青春惊慌失措
青春惊慌失措 2020-12-24 15:06

I\'m trying to get the hg-git extension working under Windows and after hours of fiddling, I finally seem to have it working. However, nothing shows up in my git repository

3条回答
  •  庸人自扰
    2020-12-24 15:36

    I had chosen to 'Initialize this repository with a README'. This meant I ended up with two heads, which I couldn't hg merge because one had a bookmark.

    To get pushing working, I had to:

    • configure hg-git and github remote as per https://blog.glyphobet.net/essay/2029
    • pull from github and update
    • force the merge (checking which id to use with hg heads),
    • commit the merge
    • add a trivial change to a file (add a space char to the end),
    • commit, then
    • move the bookmark to the tip
    • push to my configured github remote

    This ended up with commands as follows (substituting in sections)

    hg pull github
    hg update
    hg merge 
    hg addremove
    hg commit -m 'merged with github'
     # make some trivial change to a file - eg add a space where it doesn't cause harm
    hg add 
    hg commit -m 'trivial change'
    hg bookmark -f master
    hg push github
    

    make sure you pick the remote revision for the merge above - if you don't it doesn't work!

提交回复
热议问题