沧海一粟

  • Home
  • Archives
  • Table of Contents
  • Overview

Wisely Zou

52 posts
12 categories
24 tags
GitHub
Links
  • 半醉浮生 PT
  • Allen Hua 的网络博客
  • 天雨的博客
  • 苍穹の下

Combine the first two commits of a Git repository

Posted on 2023-11-25 Edited on 2026-01-29 Views:

You might have this need when just initializing a Git repository. I tried rebase -i HEAD^^ before and got an error. Today I finally found the correct way.

1
git rebase -i --root

Then change the pick of the second commit to fixup, save and exit.

Reference:
Combine the first two commits of a Git repository?

Git合并最初的两个提交
使用PNPM安装Angular
© 2023 – 2026 Wisely Zou
Powered by Hexo & NexT.Pisces
0%