# Let’s specify a reversion number

Hello everyone, It’s Ray!

Today I am going to share with you how to use git tag to specify a reversion number

After we complete a series of small functions, it could mean that we are going to release a new reversion. For example, think about the online games that you’ve played.

Every time when it released a new reversion, it came with some new function. This reversion always denotes that all those functions have been completed, also works functionally after internal testing.

This reversion number is quite convenient and important to developers. For example, a series of small functions build a big function, and the completion of this big function means that a new reversion is going to be released.

Every time when we complete a small function, we commit it, and when we finish a series of small functions and make them a big one, we use git tag to specify, denoting a reversion’s release. It’s very essential and important to developers when wanting to do some testing some time after the release.

Let’s begin with git log --oneline

Above image shows what log looks like before adding a tag.

Type
git tag -a v1.0 -m “The stable version of example”

As image above shown, you could see the reversion number we just added.

enter

git tag

You could see the reversions that we’ve made so far.

Now let’s create a new file, example2.html, and add some code on it.

Then type

As image above shown, we are now at sixth commit, and our reversion only covers to fifth commit.

When we want to go back to v1.0 reversion to check, we don’t need to checkout the name of fifth commit, instead, we type the reversion name as follows:

As image above, we’ve gone back to v1.0.

Hope that today’s article will be helpful and useful to you. See you tomorrow.