Annotated tags are meant for release while lightweight tags are meant for. You should have a look if you're looking for tagged commits constantly. Whereas a lightweight tag is simply a name for an object (usually a commit object). The describe command more configuration to the search for tags more granular. If you don't want to manually check out a particular commit to find the previous tag from there, you can also pass a commit hash argument to find the next release tag from that moment in time. The commit hash is prefixed with -g (the g is used to describe that we're dealing with git). The result also includes the number of commits on top of the found tag and the commit hash of the current commit. The command output includes three pieces of information. # after checking out a commit that's not a tag After running git describe again, it logged a different result to the terminal. I moved on, and I checked out a previous commit to find out more. If your HEAD is on a tagged commit, like mine in this case, it shows the last tag without any additional meta information. By default, describe looks into the past from the repository's HEAD. In this particular repository, the last made commit was a tagged release ( v1. I opened my terminal and started playing around with the command in one of my projects. The command finds the most recent tag that is reachable from a commit. The official git describe documentation describes the command's functionality as follows: I didn't know about git describe and dug deeper. git for-each-ref -sortcreatordate -count1 refs/tags then if you need a specific format, check the -format option. They shared how they use the command to access release information. For only the oldest (not the whole sorted list) you could output it with. ![]() Today, in one of our Slack channels at Contentful, I saw our infrastructure developers' talking about the git subscribe command.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |