Usual work flow is, git tag verify.
git tag -v tagname
Then git tag checkout.
git checkout tagname
Is there a combined command to verify the tag, shows the verification, and checks it out if verification succeeded?
In a bash shell:
git tag -v tagname && git checkout tagname
That would only work if the first command succeeds.
That can be part, for instance, of a post-receive
hook.
Or it can be made an independent command:
Even on windows, a script name git-ctag
(put anywhere in the %PATH%
) would enable you to type git ctag <atag>
, which would checkout the tag only if the verification step passes.
#!/bin/bash
git tag -v $1 && git checkout $1
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With