Skip to content

Bits of .NET

Daily micro-tips for C#, SQL, performance, and scalable backend engineering.

  • Asp.Net Core
  • C#
  • SQL
  • JavaScript
  • CSS
  • About
  • ErcanOPAK.com
  • No Access
  • Privacy Policy
Git

Git: Use Tags to Mark Releases and Important Commits

- 13.06.26 - ErcanOPAK

🏷️ Remember That Special Commit

Commit hashes are unmemorable. Tags give meaningful names. v1.0.0, release-candidate, hotfix-2. Easy to reference, easy to deploy.

📝 Create Tags

# Lightweight tag (just pointer)
git tag v1.0.0

# Annotated tag (includes author, date, message)
git tag -a v1.0.0 -m "Release version 1.0.0"

# Tag previous commit
git tag v0.9.0 a1b2c3d

# Tag with GPG signature
git tag -s v1.0.0 -m "Signed release"

# List tags
git tag
git tag -l "v1.*"

# Show tag details
git show v1.0.0

🎯 Push and Delete Tags

# Push single tag
git push origin v1.0.0

# Push all tags
git push --tags

# Delete local tag
git tag -d v1.0.0

# Delete remote tag
git push origin --delete v1.0.0

# Checkout tag (detached HEAD)
git checkout v1.0.0

# Create branch from tag
git checkout -b hotfix-branch v1.0.0

💡 Use Cases

  • Release versions (v1.0.0, v2.1.3)
  • Deployment checkpoints
  • Customer-specific builds
  • Hotfix markers
  • Milestone commits (sprint-1, prototype)

“Remembering commit hash for deployment was error-prone. git tag v1.0.0, then git push –tags. Deployment now uses tag. Simple and reliable.”

— Release Manager

Related posts:

Git: Applying a Specific Fix from One Branch to Another with Cherry-Pick

Git: Use Interactive Rebase to Clean Up Commit History

Git: Use Stash to Temporarily Save Work-in-Progress

Post Views: 3

Post navigation

Ajax: Choose the Right Response Type for Fetch
.NET Core: Configure CORS to Allow API Access from Other Domains

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

July 2026
M T W T F S S
 12345
6789101112
13141516171819
20212223242526
2728293031  
« Jun    

Most Viewed Posts

  • Get the User Name and Domain Name from an Email Address in SQL (960)
  • How to add default value for Entity Framework migrations for DateTime and Bool (898)
  • How to make theater mode the default for Youtube (858)
  • Get the First and Last Word from a String or Sentence in SQL (840)
  • How to select distinct rows in a datatable in C# (814)
  • How to enable, disable and check if Service Broker is enabled on a database in SQL Server (597)
  • Add Constraint to SQL Table to ensure email contains @ (582)
  • Average of all values in a column that are not zero in SQL (545)
  • How to use Map Mode for Vertical Scroll Mode in Visual Studio (512)
  • Find numbers with more than two decimal places in SQL (460)

Recent Posts

  • C#: Use Using Statements for Resource Management
  • C#: Use Lambda Expressions for Concise Code
  • SQL: Use GROUP BY for Data Aggregation
  • .NET Core: Master Routing for Clean URLs
  • Git: Use Reset to Undo Local Changes
  • Ajax: Use Axios for HTTP Requests
  • JavaScript: Understand Hoisting
  • HTML: Use Web Storage for Client-Side Data
  • CSS: Use Filter Effects for Visual Magic
  • Windows 11: Unlock God Mode for All Settings

Most Viewed Posts

  • Get the User Name and Domain Name from an Email Address in SQL (960)
  • How to add default value for Entity Framework migrations for DateTime and Bool (898)
  • How to make theater mode the default for Youtube (858)
  • Get the First and Last Word from a String or Sentence in SQL (840)
  • How to select distinct rows in a datatable in C# (814)

Recent Posts

  • C#: Use Using Statements for Resource Management
  • C#: Use Lambda Expressions for Concise Code
  • SQL: Use GROUP BY for Data Aggregation
  • .NET Core: Master Routing for Clean URLs
  • Git: Use Reset to Undo Local Changes

Social

  • ErcanOPAK.com
  • GoodReads
  • LetterBoxD
  • Linkedin
  • The Blog
  • Twitter
© 2026 Bits of .NET | Built with Xblog Plus free WordPress theme by wpthemespace.com