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

Re: Undocumented change in `git branch -M` behavior

From
Duy Nguyen <pclouds@gmail.com>
Date
Aug 24, 2017, 08:59 UTC
Message-ID
<CACsJy8C=D_MHRJHdbqjZHBvr-Xs_VXxzRU_KenpWrvX1Nb_iyw@mail.gmail.com>
In-Reply-To
<20170823201334.bz42s6t5ti4jdaqm@pitfall>

On Thu, Aug 24, 2017 at 3:13 AM, Nish Aravamudan <nish.aravamudan@canonical.com> wrote:

Show 6 quoted lines
> Hello,
>
> Hopefully, I've got this right -- I noticed a change in behavior in git
> with Ubuntu 17.10, which recently got 2.14.1. Specifically, that when in
> an orphaned branch, -M ends up moving HEAD to the new branch name,
> clobbering the working tree.

Thanks for the report. I think I see what's going on. I need some more time to come up with a patch but yes this is definitely a bug (and caused by my commit)

-- 
Duy
Previous: Kevin DaudtNext: Nguyễn Thái Ngọc Duy
Message 3 of 6 in “Undocumented change in `git branch -M` behavior”
  1. Nish AravamudanAug 23, 2017
  2. Kevin DaudtAug 24, 2017
  3. Duy NguyenAug 24, 2017
  4. Fix branch renaming not updating HEADs correctlyNguyễn Thái Ngọc Duy, Aug 24, 2017
  5. Nish AravamudanAug 24, 2017
  6. Junio C HamanoAug 27, 2017

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.