unixorn/git-extra-commands

View on GitHub
bin/git-checkout-tag

Summary

Maintainability
Test Coverage
#!/usr/bin/env bash
#
# Checkout a tag as a branch
#
# Copyright 2022, Joe Block <jpb@unixorn.net>

set -e

git fetch --all --tags && exec git checkout "tags/$1" -b "$1"