How to revert multiple commits as part of a single commit

前端 未结 3 1175
盖世英雄少女心
盖世英雄少女心 2020-12-14 05:35

This is not a major problem, just something I want to know whether or not is possible.

Let\'s say we have two commits, abcd123 and wxyz789,

3条回答
  •  悲&欢浪女
    2020-12-14 06:14

    You can do:

    git revert abcd123
    git revert --no-commit wxyz789
    git commit --amend
    

    ... and then write an appropriate commit message describing the combined effect of reverting both commits.

提交回复
热议问题