Interview Prep/Git & GitHub/Git internals: objects, refs and the index

What are refs/heads, refs/tags and refs/remotes?

BeginnerConceptGit internals: objects, refs and the index
Answer

They are namespaces under .git/refs. refs/heads/* are your local branches, refs/tags/* are tags, and refs/remotes/<remote>/* are remote-tracking branches that record where the remote's branches were at last fetch. You never commit onto a remote-tracking ref directly; only fetch updates it.

All Git & GitHub questions Roadmap: Git & GitHub

More on Git internals: objects, refs and the index