{"thread":{"id":"8850","subject":"Usability of git-update-ref <headname>","startedAt":"2007-07-04T02:08:46Z","lastAt":"2007-07-04T04:12:56Z","messageCount":2,"participants":["Martin Langhoff","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"46430","messageId":"46a038f90707031908x3fb2eb59ob0a57a33777363fb@mail.gmail.com","threadId":"8850","inReplyTo":null,"subject":"Usability of git-update-ref <headname>","fromName":"Martin Langhoff","fromEmail":"martin.langhoff@gmail.com","sentAt":"2007-07-04T02:08:46Z","receivedAt":"2007-07-04T02:08:46Z","isPatch":false,"sender":{"key":"martin.langhoff@gmail.com","avatar":"https://gravatar.com/avatar/1e3f311b6c4c15836501901ca58f8c0b0667246488084ba524d8bc9867e22fd9?d=mp&s=160"},"body":"A few times now I've done the following\n\n  # I think I'm on master, but I'm acually on maint\n  git-branch foo-feature\n  git-checkout foo-feature\n\n  # realise I've branched in the wring place\n  git-update-ref foo-feature master\n\nAnd from that point, all sorts of things go weird, because I should have said\n\n  git-update-ref refs/heads/foo-feature master\n\nto fix it up I have to manually rm .git/foo-feature -- and I can't see\na way to remove a ref with git-update-ref, so if I was using packed\nrefs I'd be in trouble ;-)\n\nAm I using the wrong command? I'd be happy to remove the bogus head\nand create a new one, but I don't think we have git-rm-ref.\n\n\n\nm\n"},{"id":"46431","messageId":"7vtzskq01j.fsf@assigned-by-dhcp.cox.net","threadId":"8850","inReplyTo":"46a038f90707031908x3fb2eb59ob0a57a33777363fb@mail.gmail.com","subject":"Re: Usability of git-update-ref <headname>","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2007-07-04T04:12:56Z","receivedAt":"2007-07-04T04:12:56Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Martin Langhoff\" <martin.langhoff@gmail.com> writes:\n\n> Am I using the wrong command? I'd be happy to remove the bogus head\n> and create a new one, but I don't think we have git-rm-ref.\n\nYes you are.  Forget about update-ref.  That is strictly for\nscript consumption.\n\n>  # I think I'm on master, but I'm acually on maint\n>  git-branch foo-feature\n>  git-checkout foo-feature\n>\n>  # realise I've branched in the wrong place\n\n   $ git reset --soft master\n"}]}