{"thread":{"id":"58371","subject":"Ambiguous 'HEAD' issue.","startedAt":"2022-08-27T20:42:30Z","lastAt":"2022-09-08T06:27:19Z","messageCount":7,"participants":["Caglar Akyuz","Felipe Contreras","Junio C Hamano","Jeff King","Johannes Sixt"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"462044","messageId":"AM0PR08MB4323160241D4341FB1B99CC2FD749@AM0PR08MB4323.eurprd08.prod.outlook.com","threadId":"58371","inReplyTo":null,"subject":"Ambiguous 'HEAD' issue.","fromName":"Caglar Akyuz","fromEmail":"caglar.akyuz@sparsetechnology.com","sentAt":"2022-08-27T20:42:21Z","receivedAt":"2022-08-27T20:42:30Z","isPatch":false,"sender":{"key":"caglar.akyuz@sparsetechnology.com","avatar":null},"body":"Hello,\n\nRecently I changed one of my repo's origin URL from gitlab to github.  After this switch, I start getting:\n\n  warning: refname 'HEAD' is ambiguous.\n\nmessages when I use 'git status'. I check various things if I have tags/branches to blame but cannot find anything:\n\n* git show-ref | grep -i head -> nothing suspicious\n\n* find . -name HEAD | grep -v modules -> only .git/logs/HEAD and .git/HEAD\n\n* git branch -a | grep HEAD -> nothing\n\nDo you have any suggestions for a possible fix to this?\n\nThanks,\nCaglar\n\n"},{"id":"462047","messageId":"CAMP44s2iwWhpeBrzuRK5mB9ekpy4MRu5OEQ-BA4mvbUb1EJRqw@mail.gmail.com","threadId":"58371","inReplyTo":"AM0PR08MB4323160241D4341FB1B99CC2FD749@AM0PR08MB4323.eurprd08.prod.outlook.com","subject":"Re: Ambiguous 'HEAD' issue.","fromName":"Felipe Contreras","fromEmail":"felipe.contreras@gmail.com","sentAt":"2022-08-28T01:00:59Z","receivedAt":"2022-08-28T01:01:16Z","isPatch":false,"sender":{"key":"felipe.contreras@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8358?v=4"},"body":"On Sat, Aug 27, 2022 at 5:15 PM Caglar Akyuz\n<caglar.akyuz@sparsetechnology.com> wrote:\n\n> Recently I changed one of my repo's origin URL from gitlab to github.  After this switch, I start getting:\n>\n>   warning: refname 'HEAD' is ambiguous.\n\n> * git show-ref | grep -i head -> nothing suspicious\n\nAre you sure? You don't have a ref called \"HEAD\"? Just \"HEAD\".\n\n-- \nFelipe Contreras\n"},{"id":"462057","messageId":"AM0PR08MB4323EAC9ED1F88D5FF680DEFFD779@AM0PR08MB4323.eurprd08.prod.outlook.com","threadId":"58371","inReplyTo":"CAMP44s2iwWhpeBrzuRK5mB9ekpy4MRu5OEQ-BA4mvbUb1EJRqw@mail.gmail.com","subject":"Re: Ambiguous 'HEAD' issue.","fromName":"Caglar Akyuz","fromEmail":"caglar.akyuz@sparsetechnology.com","sentAt":"2022-08-28T08:31:56Z","receivedAt":"2022-08-28T08:32:03Z","isPatch":false,"sender":{"key":"caglar.akyuz@sparsetechnology.com","avatar":null},"body":"\n\n\nFrom: Felipe Contreras <felipe.contreras@gmail.com>\nSent: Sunday, August 28, 2022 4:00 AM\nTo: Caglar Akyuz <caglar.akyuz@sparsetechnology.com>\nCc: git@vger.kernel.org <git@vger.kernel.org>\nSubject: Re: Ambiguous 'HEAD' issue. \n \nOn Sat, Aug 27, 2022 at 5:15 PM Caglar Akyuz\n<caglar.akyuz@sparsetechnology.com> wrote:\n\n>> Recently I changed one of my repo's origin URL from gitlab to github.  After this switch, I start getting:\n>>\n>>   warning: refname 'HEAD' is ambiguous.\n\n>> * git show-ref | grep -i head -> nothing suspicious\n\n> Are you sure? You don't have a ref called \"HEAD\"? Just \"HEAD\".\n\nI don't see just \"HEAD\".  \"git show-ref | grep HEAD\" doesn't show anything if that's what you mean.\n\nThanks,\nCaglar"},{"id":"462069","messageId":"xmqqsflfr1y0.fsf@gitster.g","threadId":"58371","inReplyTo":"AM0PR08MB4323160241D4341FB1B99CC2FD749@AM0PR08MB4323.eurprd08.prod.outlook.com","subject":"Re: Ambiguous 'HEAD' issue.","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2022-08-29T06:36:23Z","receivedAt":"2022-08-29T06:36:29Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Caglar Akyuz <caglar.akyuz@sparsetechnology.com> writes:\n\n> * find . -name HEAD | grep -v modules -> only .git/logs/HEAD and .git/HEAD\n\nplus \"grep HEAD .git/packed-refs\"\n\n> * git branch -a | grep HEAD -> nothing\n\nplus \"git for-each-ref | grep HEAD\"\n\n"},{"id":"462071","messageId":"AM0PR08MB432341F2A27E1133C7A31DEBFD769@AM0PR08MB4323.eurprd08.prod.outlook.com","threadId":"58371","inReplyTo":"xmqqsflfr1y0.fsf@gitster.g","subject":"Re: Ambiguous 'HEAD' issue.","fromName":"Caglar Akyuz","fromEmail":"caglar.akyuz@sparsetechnology.com","sentAt":"2022-08-29T06:57:00Z","receivedAt":"2022-08-29T06:57:08Z","isPatch":false,"sender":{"key":"caglar.akyuz@sparsetechnology.com","avatar":null},"body":"\n\n\nFrom: Junio C Hamano <jch2355@gmail.com> on behalf of Junio C Hamano <gitster@pobox.com>\nSent: Monday, August 29, 2022 9:36 AM\nTo: Caglar Akyuz <caglar.akyuz@sparsetechnology.com>\nCc: git@vger.kernel.org <git@vger.kernel.org>\nSubject: Re: Ambiguous 'HEAD' issue. \n \n>Caglar Akyuz <caglar.akyuz@sparsetechnology.com> writes:\n\n>> * find . -name HEAD | grep -v modules -> only .git/logs/HEAD and .git/HEAD\n\n>plus \"grep HEAD .git/packed-refs\"\n\nThis is empty as well.\n\n>> * git branch -a | grep HEAD -> nothing\n\n>>plus \"git for-each-ref | grep HEAD\"\n\nThis is empty output also.\n\nBoth 'grep HEAD .git/packed-refs' and 'git for-each-ref | grep HEAD'  commands return nothing and still 'git status' is complaining about ambiguous HEAD.\n\nThanks,\nCaglar\n"},{"id":"462781","messageId":"YxlGnkPBmczarL62@coredump.intra.peff.net","threadId":"58371","inReplyTo":"AM0PR08MB432341F2A27E1133C7A31DEBFD769@AM0PR08MB4323.eurprd08.prod.outlook.com","subject":"Re: Ambiguous 'HEAD' issue.","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2022-09-08T01:34:22Z","receivedAt":"2022-09-08T01:34:30Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Mon, Aug 29, 2022 at 06:57:00AM +0000, Caglar Akyuz wrote:\n\n> Both 'grep HEAD .git/packed-refs' and 'git for-each-ref | grep HEAD'\n> commands return nothing and still 'git status' is complaining about\n> ambiguous HEAD.\n\nIs it possible for you to tar up your .git directory and share it\n(either publicly, or privately to individual developers)?\n\n-Peff\n"},{"id":"462798","messageId":"e6cfc04b-8f53-fb81-ea8b-79e983e46201@kdbg.org","threadId":"58371","inReplyTo":"AM0PR08MB432341F2A27E1133C7A31DEBFD769@AM0PR08MB4323.eurprd08.prod.outlook.com","subject":"Re: Ambiguous 'HEAD' issue.","fromName":"Johannes Sixt","fromEmail":"j6t@kdbg.org","sentAt":"2022-09-08T06:27:09Z","receivedAt":"2022-09-08T06:27:19Z","isPatch":false,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"Am 29.08.22 um 08:57 schrieb Caglar Akyuz:\n> Both 'grep HEAD .git/packed-refs' and 'git for-each-ref | grep HEAD'\n> commands return nothing and still 'git status' is complaining about\n> ambiguous HEAD.\nAre you on a case-insensitive filesystem? Does `find .git -iname head\n-print` report anything that is not named uppercase HEAD?\n\n-- Hannes\n"}]}