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

Usability of git-update-ref <headname>

From
Martin Langhoff <martin.langhoff@gmail.com>
Date
Jul 4, 2007, 02:08 UTC
Message-ID
<46a038f90707031908x3fb2eb59ob0a57a33777363fb@mail.gmail.com>
A few times now I've done the following
  # I think I'm on master, but I'm acually on maint
  git-branch foo-feature
  git-checkout foo-feature
  # realise I've branched in the wring place
  git-update-ref foo-feature master
And from that point, all sorts of things go weird, because I should have said
  git-update-ref refs/heads/foo-feature master

to fix it up I have to manually rm .git/foo-feature -- and I can't see a way to remove a ref with git-update-ref, so if I was using packed refs I'd be in trouble ;-)

Am I using the wrong command? I'd be happy to remove the bogus head and create a new one, but I don't think we have git-rm-ref.

m
Next: Junio C Hamano
Message 1 of 2 in “Usability of git-update-ref <headname>”
  1. Martin LanghoffJul 4, 2007
  2. Junio C HamanoJul 4, 2007

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.