Mercurial: Remove changeset from remote branch

前端 未结 4 1849
小鲜肉
小鲜肉 2020-12-24 07:21

Is there a way to remove a from a remote changeset, or to remove an entire changeset? I accidentely pushed a .war file to a remote repo and I want to remove it.

4条回答
  •  南方客
    南方客 (楼主)
    2020-12-24 08:14

    I had a similar case where i want to remove a merged branch "A" changeset from "Dev" branch remotely using TortoiseHg:

    1. Create branch AA from branch A's parent branch; its origin.
    2. Merge A into AA (working directory) and make sure that option: "Discard all changes from the other revision" is checked.
    3. Merge AA into Dev branch (with a commit message indicating that branch A changes were removed).

    You'll see that branch A changes are no longer exist in Dev.

提交回复
热议问题