A single revision was required for the fatal need in Git rebase

Multiple branches can be created, and when performing a rebase on your repository, it is only necessary to specify the branch or reference without specifying a particular repository.


Solution 1:

Several options:

  • You may not be currently on a branch (
    <code>
    Detached head
    </code>
    ) or perhaps you are attempting to
    <code>
    rebase
    </code>
    on the incorrect branch.
    Please switch to the desired branch for
    <code>
    rebase
    </code>
    and attempt the operation again.

  • Your history does not show 8 commits; it shows 7 or fewer.

  • <p>
    try:
    <code>
    git rebase -i –root
    </code>
    </p>

Presented is the documentation regarding the

--root

flag and its effectiveness in meeting your needs.



--root


Rebase all commits reachable from , instead of limiting them with
an .This allows you to rebase the root commit(s) on a branch.  
When used with --onto, it will skip changes already contained in ``   
(instead of ``) 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 `` as parent instead.`


Solution 2:


The issue lies in the dash used in your –i. It is an en-dash (U2013) instead of a hyphen (U002D). I verified this by copying your dash and researching it on http://unicode.scarfboy.com. Please replace it with -i instead.

The error message “invalid upstream –i” served as a clue, indicating that Git was misinterpreting the –i flag as the upstream parameter instead of recognizing it as such.

Frequently Asked Questions

Posted in Git