
It’s a common DevOps practice to tag a specific commit id whenever there is a release. Also, developers tag specific commits for several uses cases.
When it comes to the application release process, whenever there is a hotfix, the fix starts from the commit id
that was tagged for release.
In this blog, you will learn the follwing.
- Checkout a particular git tag
- git clone from a tag
- merge a git tag to a branch
Checkout Git Tag
Let’s look at different options associated with checking out a git tag.
Checkout a Git Tag To Branch
Now that you know the list of available tags, you can check out a particular tag.
For example, if you want to checkout a tag v.1.0
to a branch named hotfix-1.0
, you can do so using the following git command.
git checkout tags/v.1.0 -b hotfix-1.0
List Git Tags
When you clone a repository, all the tags associated with the repository will be pulled down.
To fetch all the remote tags, use the fetch command as shown below.
git fetch --tags
You can list down all the…
Continue reading on source link