From: Erik Cervin Edin Date: Thu, 03 Nov 2022 16:52:15 GMT Subject: Re: rebase -i --update-refs can lead to deletion of branches Message-ID: In-Reply-To: On Thu, Nov 3, 2022 at 4:34 PM herr.kaste 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