As engineers, most of us use GitHub/GitLab daily, but I feel Git tags are still underrated and often underused. Recently, during a production release, tags helped me a lot. In a typical workflow, we rely on PRs and let CI/CD handle deployments. But what happens when something breaks in production even though everything was working fine before the PR? The usual approach is to revert the PR… but there’s a simpler and cleaner way 👉 Just checkout to a previous stable tag By doing this, you can instantly roll back your system to a known working state. No stress, no guesswork. From there: • Fix the issue • Push the changes • Create a new tag • Deploy again 🚀 Git tags act like a safety net for your releases. If you're not using them properly, you're missing out on a very powerful feature. 💡 Start tagging your stable releases and you’ll thank yourself later! #Git #DevOps #SoftwareEngineering #CI_CD #Backend #Developers
Unlock Git Tags for Smoother Releases
More Relevant Posts
-
🚨 Stop using git push --force It's one of the most destructive commands in a shared codebase — and most developers don't realize it until something breaks in production. Here's what actually happens when you force push: ❌ Overwrites your teammates' commits silently ❌ Permanently destroys shared history ❌ Breaks CI/CD pipelines mid-deployment The fix? You have better options: (: git push --force-with-lease → Fails if someone else pushed first. Protects your team without you thinking about it. (: git fetch && git rebase origin/main → Pull in upstream changes before pushing. Clean history, zero force needed. (: git reset --soft HEAD~1 → Undo your last commit but keep changes staged. Recommit cleanly — no remote impact. 🔑 The rule of thumb: If anyone else could be touching the branch — never force push. force-with-lease should honestly be your default. Alias it if you have to: git config --global alias.fpush "push --force-with-lease" Have you ever been burned by a force push? Drop a 🔥 below. #Git #DevOps #SoftwareEngineering #OpenSource #100DaysOfCode #Programming #WebDevelopment
To view or add a comment, sign in
-
-
Most teams break production because their Git workflow has no structure. Here's the one that actually works. Look at the image above. Three layers. That's it. Feature branches (bug fixes, refactors, new features) — developers work here in isolation. Nothing touches shared code until it's ready. Staging — every branch merges here first via a merge request. This is where things break before they reach users. That's the point. Main (Prod) — only clean, tested, reviewed code gets here via a release merge request. Versioned clearly: v0.1.0 → v0.1.1 → v0.2.0. And when production burns? Hotfix branch — created directly from Main, merged back fast, no waiting on the full release cycle. Most broken deployments aren't a code problem. They're a workflow problem. Structure your branches before you structure your components. #Git #Frontend #SoftwareEngineering #WebDev #DevOps
To view or add a comment, sign in
-
-
Writing clear Git Commit messages isn't just about being organized, it’s about making life easier for your future self and your teammates. I have started using the Conventional Commits specification to keep things consistent and clear. It is a super simple way to make code reviews faster and project histories actually readable Check out the link below in comments #git #github #devops #software #webdevelopment #fullstack
To view or add a comment, sign in
-
🔧 **Optimizing the workflow is also engineering** In software development, efficiency doesn’t only depend on the code we write, but also on how we manage our working environment. One of those small decisions that makes a real difference is how we clone Git repositories, especially when dealing with large projects or multiple active branches. A simple but very useful trick: clone **only the branch you actually need**. “`git clone --branch <branch> --single-branch <url>`” This approach avoids downloading branches and data you won’t use, which results in: - ⚡ Less setup time - 📦 Lower resource consumption - 🧹 A cleaner and more manageable history - 🤝 Faster onboarding for new developers - 🛠️ More focus on the actual task without unnecessary noise For scenarios where speed is critical, you can combine it with a shallow clone: “`git clone --branch <branch> --single-branch --depth 1 <url>`” This fetches only the latest version of the code, ideal for CI/CD, quick tests, or low‑bandwidth environments. Git also offers other tools that reinforce this efficiency‑driven mindset: - **Sparse checkout** to work only with specific folders: “`git sparse-checkout init --cone`” “`git sparse-checkout set <folder>`” - **Clone without checkout** for pipelines or automation: “`git clone --no-checkout <url>`” - **Selective fetch** when you only want to update a specific branch: “`git fetch origin <branch>`” Small optimizations like these reflect a way of working focused on productivity, clarity, and collaboration. In modern teams, these details matter: they reduce friction, accelerate delivery, and help build a strong engineering culture. #Git #DevOps #SoftwareEngineering #Productivity #CleanCode #DeveloperExperience #TechLeadership #ProgrammingTips #EngineeringCulture #Backend #Java #SpringBoot #Kubernetes #Scala
To view or add a comment, sign in
-
-
𝗚𝗶𝘁 𝗕𝗿𝗮𝗻𝗰𝗵𝗶𝗻𝗴 𝗦𝘁𝗿𝗮𝘁𝗲𝗴𝗶𝗲𝘀 𝘀𝗼𝗺𝗲𝘁𝗵𝗶𝗻𝗴 𝗜 𝘂𝗻𝗱𝗲𝗿𝘀𝘁𝗼𝗼𝗱 𝗼𝗻𝗹𝘆 𝗿𝗲𝗰𝗲𝗻𝘁𝗹𝘆 When I started using Git, I honestly thought branching simply means "create branch, push code, done." That's it. Job over. But while working on actual projects, one thing hit me hard. The wrong branching strategy does not just cause small hiccups. It creates confusion that keeps piling up and becomes very difficult to manage later. So let me share what I understood, in simple words. 𝗠𝗮𝗶𝗻 𝗼𝗿 𝗧𝗿𝘂𝗻𝗸-𝗕𝗮𝘀𝗲𝗱 𝗗𝗲𝘃𝗲𝗹𝗼𝗽𝗺𝗲𝗻𝘁: Everyone commits directly to one main branch with small, frequent updates. Simple to follow, but it needs a lot of discipline from every single person on the team. 𝗙𝗲𝗮𝘁𝘂𝗿𝗲 𝗕𝗿𝗮𝗻𝗰𝗵𝗶𝗻𝗴: Every feature gets its own separate branch. Once the work is done, it gets merged back to main. Very easy to manage and track, and honestly the most commonly used approach in most teams I have seen. 𝗚𝗶𝘁 𝗙𝗹𝗼𝘄: This one has dedicated branches for everything, main, develop, feature, release, hotfix. Slightly more process-heavy but very useful once your project or team starts growing. 𝗥𝗲𝗹𝗲𝗮𝘀𝗲 𝗕𝗿𝗮𝗻𝗰𝗵𝗶𝗻𝗴: A separate branch is created for each release and all bug fixes are handled there before anything goes live. Very helpful when you want stable and controlled deployments. One thing I genuinely realised after all this is that there is no perfect branching strategy that works for everyone. It completely depends on your team size, your project, and how frequently you are shipping things. Personally, feature branching felt like the most natural starting point for me and I still use it quite often. #DevOps #Git #GitHub #CICD #VersionControl #CloudComputing #Docker #Kubernetes #AWS #Automation #LearningDevOps #DevOpsTips
To view or add a comment, sign in
-
-
The Git branching strategy that saved me from a 3am rollback. Real talk. Nobody teaches this in bootcamps. You pick it up in prod. Usually after something breaks. Here’s what I learned the hard way — ✗ What goes wrong: Everyone pushing to main directly. One rushed hotfix breaks 3 unrelated features. Deployment freeze. Two days of untangling what went where. ✓ What actually works: feature/<ticket-id>-short-desc → develop → staging → main PRs required at every step. No exceptions. Not even for "quick" fixes. ⚡ The one habit that changes everything: git stash before switching context. Always. Future you will genuinely thank present you for this. ✓ One branch = one ticket. No exceptions. The moment you mix two features in one branch — you’ve already created a merge conflict + blocked review. 🔥 The incident that made this personal: A hotfix got pushed to the wrong branch. A feature that was 80% done went straight to production. The client called at 11pm. One conversation changed how our whole team handled branches from that point on. 💡 Branch discipline isn’t a process thing. It’s a respect-for-your-teammates thing. What’s the worst branching mistake you’ve made? No judgment — drop it below. 👇 #Git #DevOps #Agile #FullStackDeveloper #WebDev #MERN #21DaysOfDevReality #100DaysOfCode #LinkedInIndia
To view or add a comment, sign in
-
-
𝗜 𝘁𝗵𝗼𝘂𝗴𝗵𝘁 𝗜 𝗸𝗻𝗲𝘄 𝗚𝗶𝘁... 𝘂𝗻𝘁𝗶𝗹 𝗜 𝗵𝗮𝗱 𝘁𝗼 𝗱𝗼 𝘁𝗵𝗶𝘀. Recently I ran into a pretty unusual scenario: • move an entire sprint between different repositories • keep the commit history intact • adapt commit message conventions along the way But there was a real constraint: 𝘁𝗵𝗲 𝗽𝗿𝗼𝗷𝗲𝗰𝘁𝘀 𝗵𝗮𝗱 𝗱𝗶𝗳𝗳𝗲𝗿𝗲𝗻𝘁 𝗶𝗻𝗳𝗿𝗮𝘀𝘁𝗿𝘂𝗰𝘁𝘂𝗿𝗲 (𝘀𝗲𝗿𝘃𝗲𝗿 𝗰𝗼𝗻𝗳𝗶𝗴𝘀, 𝗗𝗼𝗰𝗸𝗲𝗿, 𝗽𝗶𝗽𝗲𝗹𝗶𝗻𝗲𝘀...) So copying code wasn’t an option. That’s when I used a lesser-known approach: 𝗽𝗮𝘁𝗰𝗵𝗲𝘀 + 𝘄𝗼𝗿𝗸𝘁𝗿𝗲𝗲𝘀 𝘁𝗼 𝗺𝗼𝘃𝗲 𝗱𝗲𝘃𝗲𝗹𝗼𝗽𝗺𝗲𝗻𝘁 𝗮𝗰𝗿𝗼𝘀𝘀 𝗰𝗼𝗻𝘁𝗲𝘅𝘁𝘀 The flow looked like this: 1. Develop normally in a worktree 2. Export commits using `git format-patch` 3. Adjust the patches 4. 𝗥𝗲𝗺𝗼𝘃𝗲 𝗰𝗼𝗺𝗺𝗶𝘁𝘀 𝘁𝗵𝗮𝘁 𝗱𝗶𝗱𝗻’𝘁 𝗯𝗲𝗹𝗼𝗻𝗴 𝗶𝗻 𝘁𝗵𝗲 𝘁𝗮𝗿𝗴𝗲𝘁 (𝗲.𝗴. 𝗶𝗻𝗳𝗿𝗮 𝗰𝗼𝗻𝗳𝗶𝗴𝘀) 5. Prepare the correct base on the destination 6. Reapply everything with `git am --3way` Sounds simple… but then reality hit: - commit conventions were different between the projects So I did what any dev would do… 𝗜 𝗮𝘂𝘁𝗼𝗺𝗮𝘁𝗲𝗱 𝗶𝘁 I built a shell script that: • reads a YAML mapping file (from → to) • renames patches automatically • asks for input when no mapping is found • allows 𝘀𝗸𝗶𝗽 or even 𝗮𝗯𝗼𝗿𝘁 𝗮𝗹𝗹 mid-process Result: - repeatable process - fewer manual errors - full control over history And that’s when it clicked: Git is not just version control it’s a tool for 𝘁𝗿𝗮𝗻𝘀𝗳𝗼𝗿𝗺𝗶𝗻𝗴 𝗮𝗻𝗱 𝘁𝗿𝗮𝗻𝘀𝗽𝗼𝗿𝘁𝗶𝗻𝗴 𝗵𝗶𝘀𝘁𝗼𝗿𝘆 You don’t need to copy code. You can 𝗿𝗲𝗯𝘂𝗶𝗹𝗱 𝘁𝗵𝗲 𝘀𝘁𝗼𝗿𝘆 𝘁𝗵𝗲 𝗿𝗶𝗴𝗵𝘁 𝘄𝗮𝘆 𝗼𝗻 𝘁𝗵𝗲 𝗼𝘁𝗵𝗲𝗿 𝘀𝗶𝗱𝗲. And that opens up a whole new set of possibilities. Curious: - have you ever automated a “weird” Git workflow like this? #git #softwareengineering #backend #devlife #programming #developer #tech #coding #automation #devops #softwaredevelopment #engineering
To view or add a comment, sign in
-
-
Merge vs rebase Merge shows what happened. Rebase shows what should have happened. Git isn’t just about code — it’s about telling the story of your code. Choosing between Merge and Rebase impacts your entire workflow. Good developers write code. Great developers manage history. #Git #DevOps #VersionControl #CICD #SoftwareEngineering
To view or add a comment, sign in
-
-
🚀 Handling Selective Feature Deployment with Git (Real Scenario) Recently, I faced an interesting challenge in our deployment workflow. We had multiple features merged into the UAT branch and already running on the UAT server. However, the requirement was: 👉 Not all features should go to production immediately 👉 Only one specific latest feature needed to be deployed to PROD 👉 The rest should be released later This is a very common situation in fast-paced development environments, but it needs a clean and safe approach. 💡 Solution: Git Cherry-Pick Instead of merging the entire UAT branch into production, I used git cherry-pick to selectively move only the required commit(s) to the PROD branch. ✅ Benefits of this approach: Fine-grained control over deployments Avoids unintended feature releases Keeps production stable Enables faster hotfix or priority feature releases 🛠️ Basic Steps: Identify the commit(s) in UAT Switch to the PROD branch Cherry-pick the required commit(s) Test and deploy safely git checkout prod git cherry-pick <commit-hash> ⚠️ Of course, conflicts can happen — but with careful resolution and testing, this approach works really well for controlled releases. #Git #DevOps #SoftwareDevelopment #Backend #nodejs #Deployment #Engineering #TechTips #Developers #Programming
To view or add a comment, sign in
-
-
ANATOMY OF A MERGE 🧬 Post 1: The Nightmare & The Ground Rules 🚩 Ever crossed your fingers, typed git merge, and watched half your group project vanish into the void? Merging multiple branches into main shouldn't feel like playing Russian Roulette with your codebase 🔫. Recently, while engaging in a coding group project here at UCSC, I realized that "unintentional code loss" mainly comes up due to a couple of main reasons: 1️⃣ PROCESS FAILURE: Developers working in silos and accidentally modifying the same features or components without communicating. 🛰️ 2️⃣ TECHNICAL BLINDNESS: Treating Git like "magic" instead of understanding the underlying logic engine, and ignoring powerful tools like merge editors. 🔮 Before you even touch the terminal, the best GROUND RULES stay architectural: 📍 WORK ON A SPECIFIC ISOLATED FEATURE AT ONCE: Avoid the temptation to fix everything you see in one go. If you try to fix bugs, refactor CSS, and add a new feature all before your next merge, you are creating a "conflict magnet" 🧲 📍 PUSH YOUR CODE FREQUENTLY: Don't wait until the end of the week for a "massive code dump." Smaller, frequent pushes ensure that when conflicts do happen, they are tiny and easy to resolve. It is much easier to fix a 2-line conflict today than a 200-line disaster ⏰ But what actually happens under the hood when Git compares two branches? It is not as random as it feels. 🧠 STAY TUNED FOR PART 2, where I break down almost every possible git merging instance into 7 exact scenarios to talk about how Git evaluates during a merge. We’re going to peel back the curtain on the Git Logic Engine. ⚙️ #Git #VSCode #SoftwareEngineering #UCSC #DeveloperTips #CareerGrowth #JuniorDeveloper #TechTalent #HiringTech #FullStack #DevOps
To view or add a comment, sign in
-
Explore related topics
Explore content categories
- Career
- Productivity
- Finance
- Soft Skills & Emotional Intelligence
- Project Management
- Education
- Technology
- Leadership
- Ecommerce
- User Experience
- Recruitment & HR
- Customer Experience
- Real Estate
- Marketing
- Sales
- Retail & Merchandising
- Science
- Supply Chain Management
- Future Of Work
- Consulting
- Writing
- Economics
- Artificial Intelligence
- Employee Experience
- Workplace Trends
- Fundraising
- Networking
- Corporate Social Responsibility
- Negotiation
- Communication
- Engineering
- Hospitality & Tourism
- Business Strategy
- Change Management
- Organizational Culture
- Design
- Innovation
- Event Planning
- Training & Development