git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Git ghost references

From
Chris Leong <walkraft@gmail.com>
Date
Jan 2, 2012, 23:42 UTC
Message-ID
<CAJ6vYjfpx-hfDsd+urp5_iS99p0RhmxohOc+TNv7SUWFnYe5wQ@mail.gmail.com>

I seem to have a "ghost reference" - ie. I can check out a reference that doesn't appear to exist. Does anyone know what might cause this?

~/gaf-cvs (project-membership)$ g show-ref | grep production
~/gaf-cvs (project-membership)$ g gc --prune=now
Counting objects: 117306, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (25270/25270), done.
Writing objects: 100% (117306/117306), done.
Total 117306 (delta 83839), reused 117283 (delta 83820)
~/gaf-cvs (project-membership)$ g co production
Note: checking out 'production'.

You are in 'detached HEAD' state. You can look around, make experimental changes and commit them, and you can discard any commits you make in this state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may do so (now or later) by using -b with the checkout command again. Example:

  git checkout -b new_branch_name

HEAD is now at ae5b621... Merge branch 'master' of git.freelancer.com:production ~/gaf-cvs ((no branch))$

Next: Johannes Sixt
Message 1 of 3 in “Git ghost references”
  1. Chris LeongJan 2, 2012
  2. Johannes SixtJan 3, 2012
  3. Chris LeongJan 3, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.