Skip to content

Instantly share code, notes, and snippets.

@keith9820
Last active August 29, 2015 14:04
Show Gist options
  • Save keith9820/93de292999c0ee47b9a2 to your computer and use it in GitHub Desktop.
Save keith9820/93de292999c0ee47b9a2 to your computer and use it in GitHub Desktop.
Get the larget tag number from a git repo
git ls-remote --tags origin | tail -n1 | cut -d "/" -f3
@keith9820
Copy link
Author

or svn:

svn ls http://svn.xxx.com/project/tags/qa | cut -d "/" -f 1 | sort -t . -k 1,2n -k 2,2n -k 3,2 | tail –n1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment