Git Get Previous Tag # $ git for-each-ref --sort=creatordate --format '%(refname)' refs/tags | sed 's#^refs/tags/##' | tail -n 2 | head -n 1