How to remove the first commit in git?

后端 未结 9 1752
深忆病人
深忆病人 2020-12-07 07:20

I am curious about how to remove the first commit in git.

What is the revision before committing any thing? Does this revision have a name or tag?

9条回答
  •  鱼传尺愫
    2020-12-07 07:28

    You might just want to edit your first commit (as there is always a first commit in a git repo). Consider using git commit --amend --reset-author instead of the usual git commit --amend.

提交回复
热议问题