Does git revert works with tag?

Viewed 39

I am working with code rollback on my branch, I need to check if git revert works with tags as well ?

Example: git revert <tagname>

Also, after git revert, do I need to also run git push on my branch ?

1 Answers

Yes you can use a tag name to specify a commit to revert.

For a comprehensive list of ways to specify commit, have a look at this (from git documentation): https://git-scm.com/docs/gitrevisions.

And yes, if you want your collaborators to see your changes, you need to push them.

Related