I have to use one batch script which needs to checkout the latest label while running that script in windows command propmt.
Asked
Active
Viewed 692 times
0
-
@E.Coms The OP didn't ask for a script here. – Roshan Br Oct 25 '18 at 15:48
1 Answers
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