![]() The command finds the most recent tag that is reachable from a commit. You can also search for tags that match a particular pattern. Just type git tag (with optional -l or -list). Listing the available tags in Git is straightforward. Note: use Git 2.37 with git show-ref -heads/-tags. Similarly, git show -name-only would list the tag and associated commit. ![]() Note the -d in order to dereference the annotated tag object (which have their own commit SHA1) and display the actual tagged commit. Which lists tags with their commits (see " Git Tag list, display commit sha1 hashes"). ![]() So you are good with your initial command. That being said, Charles Bailey points out that a ' git tag -m "."' actually implies a proper (unsigned annotated) tag (option ' -a'), and not a lightweight one. Normally, you want to at least pass the -a option to create an unsigned tag, or sign the tag with your GPG key via the -s or -u options. Nevertheless, you probably don’t want to push these kinds of tags. Lightweight tags are still useful though, perhaps for marking a known good (or bad) version, or a bunch of commits you may need to use in the future. Without arguments, git tag creates a “lightweight” tag that is basically a branch that never moves. Note: the git ready article on tagging disapproves of lightweight tag. lightweight tags: simple pointer to an existing commit.They’re checksummed contain the tagger name, e-mail, and date have a tagging message and can be signed and verified with GNU Privacy Guard (GPG). annotated tags: full objects stored in the Git database." version:refname" or " v:refname" (tag names are treated as versions).More recently (" How to sort git tags?", for Git 2.0+) git tag -sort= Typing "git tag" without arguments, also lists all tags. List tags with names that match the given pattern (or all if no pattern is given).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |