git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
PWPhillip Wood <phillip.wood123@gmail.com>
Date
Nov 3, 2022, 09:32 UTC
Message-ID
<16a8a331-f012-7dae-de1e-f03da95ecb6e@dunelm.org.uk>
In-Reply-To
<CAFzd1+5F4zqQ1CNeY2xaaf0r__JmE4ECiBt5h5OdiJHbaE78VA@mail.gmail.com>
Hi Caspar
On 20/10/2022 18:01, herr.kaste wrote:
Show 32 quoted lines
> Hi,
> 
> I have the following:
> 
> While doing a
> 
> `$ git rebase --interactive  --update-refs X`
> 
> I *removed* the "update-ref" lines from the todo list.  The rebase runs
> as expected and prints e.g.
> 
> ```
> Successfully rebased and updated refs/heads/test.
> Updated the following refs with --update-refs:
> refs/heads/master
> refs/heads/permissive-interactive-rebase
> refs/heads/variable-annotations-meta-block
> ```
> 
> After that all refs have been removed/deleted.
> 
> ```
> $ git branch  --list
> * test
> ```
> 
> Now, I should just have not used `--update-refs` in the first place but anyway
> I decide late that I rather don't want to update "master" etc. and it should
> probably not delete the local refs.
> 
> Actually, I so love the new feature that I switched it *on* by default, and just
> wanted to overwrite the behavior in the todo editor.

Sorry for the slow reply, I'm afraid I still haven't found time to look at this. As far as I can remember deleting the "update-ref" lines should leave the ref unchanged. I've cc'd the author to see if they have any insight into what is going on

Best Wishes
Phillip
> Regards
> Caspar Duregger
Previous: Erik Cervin EdinNext: herr.kaste
Message 3 of 17 in “rebase -i --update-refs can lead to deletion of branches”
  1. herr.kasteOct 20, 2022
  2. Erik Cervin EdinOct 20, 2022
  3. Phillip WoodNov 3, 2022
  4. herr.kasteNov 3, 2022
  5. Erik Cervin EdinNov 3, 2022
  6. Victoria DyeNov 4, 2022
  7. Phillip WoodNov 4, 2022
  8. Victoria DyeNov 4, 2022
  9. rebase --update-refs: avoid unintended ref deletionVictoria Dye, Nov 4, 2022
  10. Taylor BlauNov 4, 2022
  11. Phillip WoodNov 4, 2022
  12. Phillip WoodNov 4, 2022
  13. Derrick StoleeNov 7, 2022
  14. rebase --update-refs: avoid unintended ref deletionVictoria Dye, Nov 7, 2022
  15. Taylor BlauNov 7, 2022
  16. Derrick StoleeNov 7, 2022
  17. Phillip WoodNov 8, 2022

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.