How do I git reset --hard HEAD on Mercurial?

后端 未结 4 1003
面向向阳花
面向向阳花 2021-02-01 00:11

I\'m a Git user trying to use Mercurial.

Here\'s what happened: I did a hg backout on a changeset I wanted to revert. That created a new head, so hg instruc

4条回答
  •  夕颜
    夕颜 (楼主)
    2021-02-01 00:54

    If you've not yet commited, and it sounds like you haven't you can undo all the merge work with hg update --clean.

    However, in newer mercurial's there's a handy command to re-merge a single file: hg resolve path/to/file.ext. From the hg help resolve:

    The available actions are: ...
    
     4) discard your current attempt(s) at resolving conflicts and
    

    restart the merge from scratch: "hg resolve file..." (or "-a" for all unresolved files)

提交回复
热议问题