I've got an annotated tag refering to a commit (does it matter if it is annotated?) and no branch refering there. Will the commit be garbage collected after some time?
views:
83answers:
2
+4
A:
No, the commit will not be garbage collected. A reference from a tag is sufficient to keep a commit alive.
Greg Hewgill
2009-06-28 22:15:10
Is this documented in the git manual?
Adrian Panasiuk
2009-06-28 22:31:06
The git-gc documentation at http://www.kernel.org/pub/software/scm/git/docs/git-gc.html mentions this under the Notes section. "it will keep not only objects referenced by your current set of branches and tags..."
Greg Hewgill
2009-06-28 22:39:20
+4
A:
tags and branches are both refs, if a ref is pointing to a commit, it's not garbage collected. You can also have custom refs, but those are uncommon.
felipec
2009-06-29 00:44:08