Remove file from a commit in Mercurial

后端 未结 2 1604
耶瑟儿~
耶瑟儿~ 2021-02-02 06:11

I have a commit onto which I have amended some files. Some of these files that were part of the amend I do not want in this commit. Is there a way in Mercurial to remove certain

2条回答
  •  死守一世寂寞
    2021-02-02 06:37

    hg uncommit somefile.txt does exactly this for me.

    Like plain git reset, it removes the change from the commit but leaves the file contents unchanged, so now hg diff shows the change you just uncommitted.

    The uncommit command claims to come from the uncommit extension, but may actually be coming from the evolve extension, I admit I'm not 100% sure!

提交回复
热议问题