From: Erik Cervin Edin <erik@cervined.in>
To: "herr.kaste" <herr.kaste@gmail.com>
Cc: phillip.wood@dunelm.org.uk,
"git@vger.kernel.org" <git@vger.kernel.org>,
Derrick Stolee <derrickstolee@github.com>
Subject: Re: rebase -i --update-refs can lead to deletion of branches
Date: Thu, 3 Nov 2022 17:52:15 +0100 [thread overview]
Message-ID: <CA+JQ7M-nmQAdOGERCFbhd6v4o-mxg7T5JeKAC=pAGs1SqAzC=Q@mail.gmail.com> (raw)
In-Reply-To: <CAFzd1+58MCXC9XZ+R7QFUdtw99KV2mHUHGgQUYvoa0USuYSLog@mail.gmail.com>
On Thu, Nov 3, 2022 at 4:34 PM herr.kaste <herr.kaste@gmail.com> wrote:
>
> I have the following reproduction
>
> ```
> git init &&
> git commit --allow-empty -m "Init" &&
> git commit --allow-empty -m "A" &&
> git checkout -b feature &&
> git commit --allow-empty -m "B" &&
> git commit --allow-empty -m "C" &&
> GIT_SEQUENCE_EDITOR="sed -i -e '/^update-ref/d'" git rebase
> --update-refs master^ --interactive
> ```
Some minor changes
Better explicitly name the branch master
git init -b master &&
also
GIT_SEQUENCE_EDITOR="sed -i -e '/^u/d'" git rebase --update-refs
master^ --interactive
in case of short-form interactive rebase
But yes, it deletes the master branch
next prev parent reply other threads:[~2022-11-03 16:52 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-20 17:01 rebase -i --update-refs can lead to deletion of branches herr.kaste
2022-10-20 20:49 ` Erik Cervin Edin
2022-11-03 9:32 ` Phillip Wood
2022-11-03 15:25 ` herr.kaste
2022-11-03 16:52 ` Erik Cervin Edin [this message]
2022-11-04 0:31 ` Victoria Dye
2022-11-04 10:40 ` Phillip Wood
2022-11-04 15:28 ` Victoria Dye
2022-11-04 16:57 ` [PATCH] rebase --update-refs: avoid unintended ref deletion Victoria Dye
2022-11-04 19:44 ` Taylor Blau
2022-11-04 20:17 ` Phillip Wood
2022-11-04 20:12 ` Phillip Wood
2022-11-07 2:39 ` Derrick Stolee
2022-11-07 17:47 ` [PATCH v2] " Victoria Dye
2022-11-07 19:17 ` Taylor Blau
2022-11-07 19:25 ` Derrick Stolee
2022-11-08 9:58 ` Phillip Wood
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CA+JQ7M-nmQAdOGERCFbhd6v4o-mxg7T5JeKAC=pAGs1SqAzC=Q@mail.gmail.com' \
--to=erik@cervined.in \
--cc=derrickstolee@github.com \
--cc=git@vger.kernel.org \
--cc=herr.kaste@gmail.com \
--cc=phillip.wood@dunelm.org.uk \
/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.
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).