Git rebase interactive drop vs deleting the commit line

前端 未结 3 1895
执念已碎
执念已碎 2020-12-25 09:26

What is the difference from drop in the Git interactive rebase and just deleting the line of the commit?

3条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-25 10:23

    There is in fact another small difference:

    You can explicitly "drop" all commits. The effect will be the same as a reset.

    However if you just delete all lines, then git will tell you "Nothing to do".

    Usually you would not use rebase anyway in that case. I learned the difference only when I tried to explain removing a commit with rebase to a co-worker using a dummy commit.

提交回复
热议问题