How to push tags from local repository to Github
By Pravin•
Below is the standard Git workflow to create a tag and push it to GitHub.
1. Ensure You Are on the Correct Commit
git status git log --oneline -5
2. Create a Tag
Lightweight tag (simple marker)
git tag v1.0.0
Annotated tag (recommended for releases)
Includes author, date, and message.
git tag -a v1.0.0 -m "Release version 1.0.0"
3. Verify Tag
git tag git show v1.0.0
4. Push Tag to GitHub
Push a single tag
git push origin v1.0.0
Push all local tags
git push origin --tags
5. Tag a Specific Commit (optional)
git tag -a v1.0.0 <commit_hash> -m "Release version 1.0.0" git push origin v1.0.0
6. Delete a Tag (if needed)
Delete locally
git tag -d v1.0.0
Delete from GitHub
git push origin --delete v1.0.0
Typical Release Flow
# push your changes first git add . git commit -m "Final changes before release" git push origin main # create and push tag git tag -a v1.0.0 -m "Production release" git push origin v1.0.0
After pushing, the tag will appear under GitHub → Repository → Releases / Tags. You can then create a formal release from the GitHub UI if required.
Comments
No comments yet. Be the first to comment!
Leave a Comment
Your comment will be visible after approval.