Eugene
Eugene

Reputation: 4337

Git -i rebase : Unknown command: squash

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?

Upvotes: 2

Views: 1744

Answers (2)

Patrick B.
Patrick B.

Reputation: 12343

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

Upvotes: 0

manojlds
manojlds

Reputation: 301117

There should be no : after squash

Upvotes: 2

Related Questions