git rebase fatal: Needed a single revision invalid upstream –i

Several options:

  • You are not on a branch (Detached head) or maybe you are trying to rebase or the wrong branch.
    Checkout the branch you want to rebase and try again.

  • you don’t have 8 commits in your history (you have 7 or less)

  • try: git rebase -i --root

Here is the documentation for the --root flag and why it will work for you.

--root

Rebase all commits reachable from <branch>, instead of limiting them with
an <upstream>.This allows you to rebase the root commit(s) on a branch.  
When used with --onto, it will skip changes already contained in `<newbase>`   
(instead of `<upstream>`) whereas without --onto it will operate on every 
change. When used together with both --onto and --preserve-merges, all root 
commits will be rewritten to have `<newbase>` as parent instead.`

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)