From: Kevin Daudt Date: Mon, 25 Jan 2021 11:22:53 GMT Subject: Re: Can not rebase to first commit Message-ID: In-Reply-To: <1327609829.20210125123816@yandex.ru> On Mon, Jan 25, 2021 at 12:38:16PM +0200, Eugen Konkov wrote: > I can not rebase to first commit. > > This is how to reproduce: > > kes@work ~/work/projects/general/Auth $ git tree > * 67857d5 (HEAD -> dev) asdf > * 1e99034 (local/dev) Initial commit > kes@work ~/work/projects/general/Auth $ git rebase -i --autostash --rebase-merges 1e99034^ > fatal: invalid upstream '1e99034^' > > > git --version > git version 2.30.0 > > -- > Best regards, > Eugen Konkov > This is because the first commit (1e99034) does not have a parent, so 1e99034^ cannot be resolved. git rebase does however have an option for this: git rebase -i --root. That allows you to rebase the root commit. Hope this helps, Kevin