Usability of git-update-ref <headname>

From: Martin Langhoff <hidden>
Date: 2016-06-15 22:43:19

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help