Re: rebase -i --update-refs can lead to deletion of branches

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Nov 3, 2022 at 4:34 PM herr.kaste <herr.kaste@xxxxxxxxx> 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



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux