{"thread":{"id":"29282","subject":"Git ghost references","startedAt":"2012-01-02T23:42:04Z","lastAt":"2012-01-03T08:32:22Z","messageCount":3,"participants":["Chris Leong","Johannes Sixt"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"181850","messageId":"CAJ6vYjfpx-hfDsd+urp5_iS99p0RhmxohOc+TNv7SUWFnYe5wQ@mail.gmail.com","threadId":"29282","inReplyTo":null,"subject":"Git ghost references","fromName":"Chris Leong","fromEmail":"walkraft@gmail.com","sentAt":"2012-01-02T23:42:04Z","receivedAt":"2012-01-02T23:42:04Z","isPatch":false,"sender":{"key":"walkraft@gmail.com","avatar":"https://gravatar.com/avatar/b652eca2f2121a90d994b41963e2b6bd9546a39e26dba0f06c8ccb478fceef3d?d=mp&s=160"},"body":"I seem to have a \"ghost reference\" - ie. I can check out a reference\nthat doesn't appear to exist. Does anyone know what might cause this?\n\n~/gaf-cvs (project-membership)$ g show-ref | grep production\n~/gaf-cvs (project-membership)$ g gc --prune=now\nCounting objects: 117306, done.\nDelta compression using up to 2 threads.\nCompressing objects: 100% (25270/25270), done.\nWriting objects: 100% (117306/117306), done.\nTotal 117306 (delta 83839), reused 117283 (delta 83820)\n~/gaf-cvs (project-membership)$ g co production\nNote: checking out 'production'.\n\nYou are in 'detached HEAD' state. You can look around, make experimental\nchanges and commit them, and you can discard any commits you make in this\nstate without impacting any branches by performing another checkout.\n\nIf you want to create a new branch to retain commits you create, you may\ndo so (now or later) by using -b with the checkout command again. Example:\n\n  git checkout -b new_branch_name\n\nHEAD is now at ae5b621... Merge branch 'master' of git.freelancer.com:production\n~/gaf-cvs ((no branch))$\n"},{"id":"181852","messageId":"4F02BAF9.1000206@kdbg.org","threadId":"29282","inReplyTo":"CAJ6vYjfpx-hfDsd+urp5_iS99p0RhmxohOc+TNv7SUWFnYe5wQ@mail.gmail.com","subject":"Re: Git ghost references","fromName":"Johannes Sixt","fromEmail":"j6t@kdbg.org","sentAt":"2012-01-03T08:23:21Z","receivedAt":"2012-01-03T08:23:21Z","isPatch":false,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"Am 03.01.2012 00:42, schrieb Chris Leong:\n> I seem to have a \"ghost reference\" - ie. I can check out a reference\n> that doesn't appear to exist. Does anyone know what might cause this?\n> \n> ~/gaf-cvs (project-membership)$ g show-ref | grep production\n> ~/gaf-cvs (project-membership)$ g co production\n> Note: checking out 'production'.\n> ...\n\nThe most likely reason is that you have a ref 'production' directly in\nthe .git directory. Perhaps you or one of your scripts created it\naccidentally using 'git update-ref production ae5b621', i.e., without\ngiving the full ref path name.\n\n-- Hannes\n"},{"id":"181853","messageId":"CAJ6vYjd2YLUa82tUrXq+N=7+kdVxH8ryS64mKKkwhA6K+QfcDw@mail.gmail.com","threadId":"29282","inReplyTo":"4F02BAF9.1000206@kdbg.org","subject":"Re: Git ghost references","fromName":"Chris Leong","fromEmail":"walkraft@gmail.com","sentAt":"2012-01-03T08:32:22Z","receivedAt":"2012-01-03T08:32:22Z","isPatch":false,"sender":{"key":"walkraft@gmail.com","avatar":"https://gravatar.com/avatar/b652eca2f2121a90d994b41963e2b6bd9546a39e26dba0f06c8ccb478fceef3d?d=mp&s=160"},"body":"I did have a production file in my .git and also an empty folder left\nin my remotes. Thanks heaps!\n\nOn Tue, Jan 3, 2012 at 7:23 PM, Johannes Sixt <j6t@kdbg.org> wrote:\n> Am 03.01.2012 00:42, schrieb Chris Leong:\n>> I seem to have a \"ghost reference\" - ie. I can check out a reference\n>> that doesn't appear to exist. Does anyone know what might cause this?\n>>\n>> ~/gaf-cvs (project-membership)$ g show-ref | grep production\n>> ~/gaf-cvs (project-membership)$ g co production\n>> Note: checking out 'production'.\n>> ...\n>\n> The most likely reason is that you have a ref 'production' directly in\n> the .git directory. Perhaps you or one of your scripts created it\n> accidentally using 'git update-ref production ae5b621', i.e., without\n> giving the full ref path name.\n>\n> -- Hannes\n"}]}