What’s the Best Deployment Strategy for Git Tags, Especially for Hotfixes?
Asked by
rawStack_12
Hey everyone! I'm trying to find a deployment strategy that balances convenience for developers with reliability. Currently, we use Git tags that are created only when code is merged into the 'main' branch. After that, we deploy those tags to development, then promote them to staging, and finally to production. The issue arises when we deploy something to production that later requires a hotfix, but our main branch has already moved ahead with new commits. How do you handle this kind of situation effectively? I'm interested in strategies that allow easy reverts and hotfixes. I know ArgoCD helps with easy reverts, but I'm looking for more insights. Thanks!
Answers
What kind of problems have you run into with reverts? I’m curious about some real-life experiences.
Reply to this answer
Honestly, I think easy reverts are often a bad idea. Trying to accommodate them can lead to bigger issues down the line. Instead, I recommend always pushing forward and using feature flags to manage any problematic features. This way, if something goes wrong, you can just toggle the feature off without messing with the entire deployment process.
Reply to this answer
For a hotfix, the best approach is to create a separate branch from the release tag that is currently in production. This lets you make the necessary fixes without getting tangled up in newer commits on the main branch.
Reply to this answer
Why are you asking this again? Didn't you cover this topic just last week?
Reply to this answer
Add your answer
Answers are reviewed before publication.
Related Discussions