git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Taylor Blau <me@ttaylorr.com>
To: Eugen Konkov <kes-kes@yandex.ru>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: Can not rebase to first commit
Date: Mon, 25 Jan 2021 09:21:56 -0500	[thread overview]
Message-ID: <YA7T8fo5zngSD+zd@nand.local> (raw)
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

(Unrelated to your question, but I assume that 'git tree' is an alias of
'git log --oneline --graph' by the looks of it).

> kes@work ~/work/projects/general/Auth $ git rebase -i --autostash --rebase-merges 1e99034^
> fatal: invalid upstream '1e99034^'

Yes, this is because you're asking to rebase your branch onto the parent
of 1e99034, which doesn't exist because 1e99034 is the "root" commit and
therefore has no parents.

'git rebase' has a special option for exactly this case, which is
'--root'. By replacing '1e99034^' with '--root', you should be able to
do what you want.

Thanks,
Taylor

  parent reply	other threads:[~2021-01-26  2:53 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-25 10:38 Can not rebase to first commit Eugen Konkov
2021-01-25 11:22 ` Kevin Daudt
2021-01-25 11:30 ` Martin Ågren
2021-01-25 13:24 ` Thomas Braun
2021-01-25 14:21 ` Taylor Blau [this message]
2021-01-25 16:53 ` Matheus Tavares Bernardino
2021-01-26 17:26   ` Eugen Konkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YA7T8fo5zngSD+zd@nand.local \
    --to=me@ttaylorr.com \
    --cc=git@vger.kernel.org \
    --cc=kes-kes@yandex.ru \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).