1

I am working on the PowerShell right now and would like to display the version and if possible the description of a tag from which I get the hash value. By version I mean something like 55.1.

How can I do this on the PowerShell?

I thank you already for help

HawkClear
  • 19
  • 2

1 Answers1

0

You could either:

In both cases, you will be able to type:

git show-ref --tags

To list tags version and their sha

Or, for a given commit SHA:

git log --oneline --decorate --tags --no-walk -1 <SHA>

Or, as suggested, with git 2.7+:

git for-each-ref --points-at <commit> --format '%(refname)'
git branch --points-at <commit>
git tag --points-at <commit>
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250