Re: Deleting remote branch pointed by remote HEAD
- From
Marc-André Lureau <marcandre.lureau@gmail.com>
- Date
- Jan 21, 2009, 14:38 UTC
- Message-ID
- <e29894ca0901210638t636de791sf27d28893a7a0b65@mail.gmail.com>
- In-Reply-To
- <49773240.7090605@drmicha.warpmail.net>
On Wed, Jan 21, 2009 at 4:33 PM, Michael J Gruber <git@drmicha.warpmail.net> wrote:
Show 11 quoted lines
> Marc-André Lureau venit, vidit, dixit 21.01.2009 14:02: >> Hi >> >> I deleted a remote branch which was pointed by HEAD, this way: "git >> push origin :master" >> >> Then for almost every git command, I get this error: "error: >> refs/remotes/origin/HEAD points nowhere!". > > You're talking about about the remote git repo, aren't you? >
Sure. But the error is on the local repo.
Show 12 quoted lines
>> I found this situation non-friendly. Fortunately, I could understand >> what's going on. But a new user might be confused. >> >> Shouldn't the remote HEAD branch be updated or "protected" in some >> ways? Or should the "error" be considered as a "warning" (silently?) >> >> What do you think? > > I think that git said > "warning: updating the currently checked out branch; this may cause > confusion, > as the index and working tree do not reflect changes that are now in HEAD."
IIRC, it only says so if your local repo is on a branch tracking this remote. At least, in some conditions, I didn't get this warning. When I did second simple testing with git.git version, I also had this warning.
Show 5 quoted lines
> after your push and that this may have rung some bells. I also think > that pushing to a non-bare remote repo (one with a worktree checked out) > is strongly advised against in multiple places, unless you know what > you're doing - which you seem to do since you were able to restore your > HEAD ;)
Isn't HEAD also on non-bare repo, to indicate what is the default branch?
thanks,
-- Marc-André Lureau