From: Jacob Keller Date: Fri, 04 Sep 2015 04:59:53 GMT Subject: Re: determine name of tag used for checkout when multiple tags exist? Message-ID: In-Reply-To: On Thu, Sep 3, 2015 at 7:53 PM, Jesse Hopkins wrote: > > It seems to me that when checking out to a tag, Git does not record the > *name* of the tag anywhere, but rather sets HEAD to the de-referenced > commit SHA-1. As far as I can tell, it is not possible to recover the > original name of the tag in the case of multiple tags on the same commit. > Is my conclusion correct? > I believe you are correct unless you check out to a branch named after the tag? I don't believe it will actually store the tag as part of its checkout. Ie: git checkout may show "checked out at " via status, but that is only because status uses describe to find that out.. I don't believe we store the information. You could recover it if you know something about the format so as to distinquish them, ie: if you only cared about annotated tags vs lightweight tags, for example. Regards, Jake