Perform an empty commit with mercurial

后端 未结 3 1185
灰色年华
灰色年华 2021-01-04 02:29

With with Mercurial queues extension, I can make an empty commit with some commit message like so:

hg qnew patch_name -m \"message\"

Is the

3条回答
  •  清酒与你
    2021-01-04 03:09

    You can use hg commit --amend to create empty commits.

    Just create an arbitrary commit and backout the change. Afterwards fold both commits together.

    Example:

    touch tmp                               # create dummy file
    hg add tmp                              # add file and...
    hg commit -m "tmp"                      # ... commit
    hg rm tmp                               # remove the file again and ...
    hg commit --amend -m "empty commit"     # ... commit
    

提交回复
热议问题