git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Ambiguous 'HEAD' issue.
@ 2022-08-27 20:42 Caglar Akyuz
  2022-08-28  1:00 ` Felipe Contreras
  2022-08-29  6:36 ` Junio C Hamano
  0 siblings, 2 replies; 7+ messages in thread
From: Caglar Akyuz @ 2022-08-27 20:42 UTC (permalink / raw)
  To: git

Hello,

Recently I changed one of my repo's origin URL from gitlab to github.  After this switch, I start getting:

  warning: refname 'HEAD' is ambiguous.

messages when I use 'git status'. I check various things if I have tags/branches to blame but cannot find anything:

* git show-ref | grep -i head -> nothing suspicious

* find . -name HEAD | grep -v modules -> only .git/logs/HEAD and .git/HEAD

* git branch -a | grep HEAD -> nothing

Do you have any suggestions for a possible fix to this?

Thanks,
Caglar


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Ambiguous 'HEAD' issue.
  2022-08-27 20:42 Ambiguous 'HEAD' issue Caglar Akyuz
@ 2022-08-28  1:00 ` Felipe Contreras
  2022-08-28  8:31   ` Caglar Akyuz
  2022-08-29  6:36 ` Junio C Hamano
  1 sibling, 1 reply; 7+ messages in thread
From: Felipe Contreras @ 2022-08-28  1:00 UTC (permalink / raw)
  To: Caglar Akyuz; +Cc: git

On Sat, Aug 27, 2022 at 5:15 PM Caglar Akyuz
<caglar.akyuz@sparsetechnology.com> wrote:

> Recently I changed one of my repo's origin URL from gitlab to github.  After this switch, I start getting:
>
>   warning: refname 'HEAD' is ambiguous.

> * git show-ref | grep -i head -> nothing suspicious

Are you sure? You don't have a ref called "HEAD"? Just "HEAD".

-- 
Felipe Contreras

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Ambiguous 'HEAD' issue.
  2022-08-28  1:00 ` Felipe Contreras
@ 2022-08-28  8:31   ` Caglar Akyuz
  0 siblings, 0 replies; 7+ messages in thread
From: Caglar Akyuz @ 2022-08-28  8:31 UTC (permalink / raw)
  To: Felipe Contreras; +Cc: git




From: Felipe Contreras <felipe.contreras@gmail.com>
Sent: Sunday, August 28, 2022 4:00 AM
To: Caglar Akyuz <caglar.akyuz@sparsetechnology.com>
Cc: git@vger.kernel.org <git@vger.kernel.org>
Subject: Re: Ambiguous 'HEAD' issue. 
 
On Sat, Aug 27, 2022 at 5:15 PM Caglar Akyuz
<caglar.akyuz@sparsetechnology.com> wrote:

>> Recently I changed one of my repo's origin URL from gitlab to github.  After this switch, I start getting:
>>
>>   warning: refname 'HEAD' is ambiguous.

>> * git show-ref | grep -i head -> nothing suspicious

> Are you sure? You don't have a ref called "HEAD"? Just "HEAD".

I don't see just "HEAD".  "git show-ref | grep HEAD" doesn't show anything if that's what you mean.

Thanks,
Caglar

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Ambiguous 'HEAD' issue.
  2022-08-27 20:42 Ambiguous 'HEAD' issue Caglar Akyuz
  2022-08-28  1:00 ` Felipe Contreras
@ 2022-08-29  6:36 ` Junio C Hamano
  2022-08-29  6:57   ` Caglar Akyuz
  1 sibling, 1 reply; 7+ messages in thread
From: Junio C Hamano @ 2022-08-29  6:36 UTC (permalink / raw)
  To: Caglar Akyuz; +Cc: git

Caglar Akyuz <caglar.akyuz@sparsetechnology.com> writes:

> * find . -name HEAD | grep -v modules -> only .git/logs/HEAD and .git/HEAD

plus "grep HEAD .git/packed-refs"

> * git branch -a | grep HEAD -> nothing

plus "git for-each-ref | grep HEAD"


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Ambiguous 'HEAD' issue.
  2022-08-29  6:36 ` Junio C Hamano
@ 2022-08-29  6:57   ` Caglar Akyuz
  2022-09-08  1:34     ` Jeff King
  2022-09-08  6:27     ` Johannes Sixt
  0 siblings, 2 replies; 7+ messages in thread
From: Caglar Akyuz @ 2022-08-29  6:57 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git




From: Junio C Hamano <jch2355@gmail.com> on behalf of Junio C Hamano <gitster@pobox.com>
Sent: Monday, August 29, 2022 9:36 AM
To: Caglar Akyuz <caglar.akyuz@sparsetechnology.com>
Cc: git@vger.kernel.org <git@vger.kernel.org>
Subject: Re: Ambiguous 'HEAD' issue. 
 
>Caglar Akyuz <caglar.akyuz@sparsetechnology.com> writes:

>> * find . -name HEAD | grep -v modules -> only .git/logs/HEAD and .git/HEAD

>plus "grep HEAD .git/packed-refs"

This is empty as well.

>> * git branch -a | grep HEAD -> nothing

>>plus "git for-each-ref | grep HEAD"

This is empty output also.

Both 'grep HEAD .git/packed-refs' and 'git for-each-ref | grep HEAD'  commands return nothing and still 'git status' is complaining about ambiguous HEAD.

Thanks,
Caglar

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Ambiguous 'HEAD' issue.
  2022-08-29  6:57   ` Caglar Akyuz
@ 2022-09-08  1:34     ` Jeff King
  2022-09-08  6:27     ` Johannes Sixt
  1 sibling, 0 replies; 7+ messages in thread
From: Jeff King @ 2022-09-08  1:34 UTC (permalink / raw)
  To: Caglar Akyuz; +Cc: Junio C Hamano, git

On Mon, Aug 29, 2022 at 06:57:00AM +0000, Caglar Akyuz wrote:

> Both 'grep HEAD .git/packed-refs' and 'git for-each-ref | grep HEAD'
> commands return nothing and still 'git status' is complaining about
> ambiguous HEAD.

Is it possible for you to tar up your .git directory and share it
(either publicly, or privately to individual developers)?

-Peff

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Ambiguous 'HEAD' issue.
  2022-08-29  6:57   ` Caglar Akyuz
  2022-09-08  1:34     ` Jeff King
@ 2022-09-08  6:27     ` Johannes Sixt
  1 sibling, 0 replies; 7+ messages in thread
From: Johannes Sixt @ 2022-09-08  6:27 UTC (permalink / raw)
  To: Caglar Akyuz; +Cc: git, Junio C Hamano

Am 29.08.22 um 08:57 schrieb Caglar Akyuz:
> Both 'grep HEAD .git/packed-refs' and 'git for-each-ref | grep HEAD'
> commands return nothing and still 'git status' is complaining about
> ambiguous HEAD.
Are you on a case-insensitive filesystem? Does `find .git -iname head
-print` report anything that is not named uppercase HEAD?

-- Hannes

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-09-08  6:27 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-27 20:42 Ambiguous 'HEAD' issue Caglar Akyuz
2022-08-28  1:00 ` Felipe Contreras
2022-08-28  8:31   ` Caglar Akyuz
2022-08-29  6:36 ` Junio C Hamano
2022-08-29  6:57   ` Caglar Akyuz
2022-09-08  1:34     ` Jeff King
2022-09-08  6:27     ` Johannes Sixt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).