Is using Git tags the appropriate way of tracking advances? #158047
Replies: 3 comments 1 reply
-
🕒 Discussion Activity Reminder 🕒 This Discussion has been labeled as dormant by an automated system for having no activity in the last 60 days. Please consider one the following actions: 1️⃣ Close as Out of Date: If the topic is no longer relevant, close the Discussion as 2️⃣ Provide More Information: Share additional details or context — or let the community know if you've found a solution on your own. 3️⃣ Mark a Reply as Answer: If your question has been answered by a reply, mark the most helpful reply as the solution. Note: This dormant notification will only apply to Discussions with the Thank you for helping bring this Discussion to a resolution! 💬 |
Beta Was this translation helpful? Give feedback.
-
Yes—replacing the “copy-a-folder-with-a-date” ritual with annotated Git tags (or GitHub “Releases”, which are just tags with metadata) is the modern, source-controlled way to mark deployable builds. Why tags beat dated folders Single source of truth – The tag points to the exact commit you shipped; no one has to guess which files went into “2024-05-16”. Immutable & traceable – Tag history lives in the repo clone, so you can compare, diff or rollback with one Git command. Works with automation – Most CI/CD platforms, including GitHub Actions, allow you to trigger a build or deploy job whenever a tag that matches a pattern (e.g. v*) is pushed. Clean workspace – You no longer accumulate dozens of dated copies on disk. Good practices to adopt Use annotated (or signed) tags text Automate tagging and deployment Trigger on merges to main or on a manual “Release” workflow. Build, test, publish artifacts, then actions/create-release (or git tag) and deploy. Different environments, different tags (optional) Attach release notes & artifacts Room for improvement Immutable build artifacts – Instead of checking out source on the server each time, have CI produce a signed package or container image tagged v1.2.3 and deploy that. Rollback automation – A one-click “redeploy tag X” script (or environment promotion in GitHub Actions) cuts rollback time further. Branch protection & checks – Require tests to pass before a release tag can be created or pushed to main. Bottom line |
Beta Was this translation helpful? Give feedback.
-
Yes, using Git tags is an appropriate and widely recommended way to track advances, releases, and deployments in your project. Why Git tags are a good approach: Summary: |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Select Topic Area
Question
Body
Where I work, we used to have TFS. That resulted in several project management practices, which I believe are now a hold over, now that we've adopted Git and GitHub.
One such practice commonly used here, is when deploying a new web application, someone will make a copy of the current one into a folder named Current. A before they make that copy, they move what's in Current to another folder, naming that new folder something that includes the date. Consequently, we have a large number of folders all with dates in their names for previous versions of the web app.
I'm thinking a better approach is, when we've got a version of the web app that we like, then create an annotated tag associated with that commit. Then if we have to revert to some previous version of the web application, we pull that commit associated with that tag. Is that a good approach? Could it be improved?
Beta Was this translation helpful? Give feedback.
All reactions