Git -i rebase :未知命令:squash

发布于 2024-11-28 19:54:29 字数 748 浏览 3 评论 0原文

目前我的 git-rebase-todo 是

squash: f732993 aaatest

# Rebase f3a7aa7..f732993 onto f3a7aa7
#
# Commands:
# p, pick = use commit
# r, reword = use commit, but edit the commit message
# e, edit = use commit, but stop for amending
# s, squash = use commit, but meld into previous commit
# f, fixup = like "squash", but discard this commit's log message
#
# If you remove a line here THAT COMMIT WILL BE LOST.
# However, if you remove everything, the rebase will be aborted.
#

并且命令行输出

eugene@eugene-desktop:~/git$ git rebase --continue
Unknown command: fixup: f732993 aaatest
Please fix this in the file /home/eugene/git/.git/rebase-merge/git-rebase-todo.

为什么它不能识别南瓜,我的 git 安装有问题吗?

At the current point my git-rebase-todo is

squash: f732993 aaatest

# Rebase f3a7aa7..f732993 onto f3a7aa7
#
# Commands:
# p, pick = use commit
# r, reword = use commit, but edit the commit message
# e, edit = use commit, but stop for amending
# s, squash = use commit, but meld into previous commit
# f, fixup = like "squash", but discard this commit's log message
#
# If you remove a line here THAT COMMIT WILL BE LOST.
# However, if you remove everything, the rebase will be aborted.
#

And command line outputs

eugene@eugene-desktop:~/git$ git rebase --continue
Unknown command: fixup: f732993 aaatest
Please fix this in the file /home/eugene/git/.git/rebase-merge/git-rebase-todo.

Why does it not recognize squash, is something wrong with my git installation?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

听你说爱我 2024-12-05 19:54:29

squash 之后不应有 :

There should be no : after squash

尐偏执 2024-12-05 19:54:29

你不能将一次提交压缩为空。您至少需要两次提交,以便可以将一项提交压缩到另一项提交中。

You cannot squash a commit into nothing. You need at least two commits where you can squash one into the other one.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文