使用 git rebase 显示存储库中的所有提交

Show all commits in repository with git rebase

我 运行ning git rebase HEAD~X 并且我无法在我 运行 这个命令后打开的文本编辑器上接受所有提交,我有 6 个提交出现当我 运行 git log --all.

运行 git rebase -i HEAD~2 它只显示 2 个要编辑,我不允许 运行 甚至 HEAD~3 ,这样做我得到

fatal: invalid upstream 'HEAD~6'

我认为发生这种情况是因为我 运行 git 重置之前,我想查看 git rebase 上的所有 6 次提交。

编辑

我有一个存储库,其中仅包含一个名为“main”的 b运行ch,并且从一开始就有 6 次提交:https://github.com/DevEsteves/WebScrapingWithPython

I want to see all of the 6 commits on git rebase

在交互式 rebase 待办事项列表中,您只能看到从您现在所在位置 (HEAD) 开始的父链。如果这 6 个提交中的某些不是您的直接父级/祖先,您将不会在列表中看到它们。

I have 6 commits that appears when I run git log --all

但这并不意味着您和开始之间有 6 个祖先提交。尝试

git log --all --oneline --decorate --graph

为了更好地了解您的位置。

也就是说,请注意,您可能会通过说

向您的交互式 rebase 待办事项列表中再提交一次
git rebase -i --root