Git: Needed a single revision error


I initialized a new git in my project and I have only two commits so far. My log is like below

When I try to rebase this commits I get error like below

I quite research at google but I haven’t found solution till now.


In your case, there is no HEAD~2, since you only have 2 commits, hence the “Needed a single revision” error message.

see more about --root at “Change first commit of project with Git?

Leave a Reply