What is the sequence for tagging commit in git?

Chandu picture Chandu · Feb 5, 2016 · Viewed 7.5k times · Source

I cloned a git repo and made some changes. I have to commit changes and then tag those committed changes. What should be the sequence of commands? Is it like: git clone, git add, git commit, git push, and then git tag?

If not, what is the sequence ?

Answer

Linkid picture Linkid · Feb 5, 2016

You can tag a revision right after your commit or later (after a push). Then, you can push your tag with: git push origin [tagname].

So, yes, your sequence is ok. Take a look at this, for more details: https://git-scm.com/book/en/v2/Git-Basics-Tagging.