So the first thing is to separate everything else by something else than space which is sort of unique: git for-each-ref -sort=taggerdate -format '%(tag)_,_%(taggerdate:raw)_,_%(taggername)_,_%(subject)' refs/tags In Figure 9.82 above, the tags are all lightweight, I can tell this because it tells me there is no release notes for any of the. Arbitrary extended SHA1 expression (see gitrevisions(5)) that typically names a branch head or a tag. The tagger name is also separated by white spacesĪnother thing is that the the output separation can currently not be done via whitespace as the tagger name can have multiple words separated by spaces itself. git-show-branch - Show branches and their commits.Sorting by refname is not the only way of sorting Git tags. The Git ls-remote command is used to view the tags of. Prettifyīefore we can start to apply our command line-fu on the above output, we will set a clear goal:įor the vertical alignment there are also a few problems that might arise: In order to list Git tags following a lexicographic order, you have to use the git tag command with the sortrefname option and an additional tag pattern. Tag names can also be viewed in various sorted order by using the -sort option with the appropriate key. So when you want to find out just about any specific information. We now have some more information, but it is not very cleary arranged. You can use the show command to extract various metadata about blobs, trees, tags, and commits. If you don’t specify a message for an annotated tag, Git launches your editor so you can type it in. For a full list of all possible values, have a look at man git-for-each-ref.įor now, we are using: the tag name, the tagging date, the name of the tagger and the tag message: git for-each-ref -sort=taggerdate -format '%(tag) %(taggerdate:raw) %(taggername) %(subject)' refs/tags The easiest way is to specify -a when you run the tag command: git tag -a v1.4 -m 'my version 1.4' git tag v0.1 v1.3 v1.4 The -m specifies a tagging message, which is stored with the tag. The image below shows the commit log of Git Extensions with two tags. Verbose OutputĪs you have probably guessed it already, the parameter –format is responsible to extend the information. Tags are used to mark a specific version. To get more information on a tag: git show v1.4. To view all the created tags in alphabetical order: git tag. (Ex: v1.3.2) It essentially allows you to give a commit a special name (tag). This is also the big difference between tags and branches: while a branch pointer. For instance, software release versions can be tagged. The most simple form to sort tags by date is shown below: git for-each-ref -sort=taggerdate -format '%(tag)'īut you could also display some more information instead of just the tag itself. In Git, tags are used to mark specific commits, e.g.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |