0

I have to use one batch script which needs to checkout the latest label while running that script in windows command propmt.

1 Answers1

1

You can fetch the latest tags, and then check out using that information (for bash/shell scripts).

git fetch --tags
git checkout $(git describe --tags $(git rev-list --tags --max-count=1))

Additionally you can also follow this answer: Git Checkout Latest Tag

Roshan Br
  • 362
  • 2
  • 17