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
Merge vs Rebase in Git: Impact on Workflow
More Relevant Posts
-
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
-
-
Day 103. Branching and pull requests. Not flashy. But this is where real team Git lives. Spent today understanding branching properly — not just git checkout -b and hoping for the best, but why branches exist in the DAG. A branch is just a pointer. A lightweight label on a commit node. That's it. Then pull requests. A PR isn't a Git feature — it's a conversation. You're not just merging code, you're saying "hey, here's what I built, here's why, review it before it touches main." The discipline of: Branching off main cleanly Making focused commits Writing a PR description that actually explains the change ...that's the difference between a codebase you can navigate and one that's a nightmare. Still sharpening. Day 103. Consistent. #Git #DevOps #100DaysOfCode #LearningInPublic #Infracodebase
To view or add a comment, sign in
-
-
𝗚𝗶𝘁 𝗠𝗲𝗿𝗴𝗲 𝘃𝘀 𝗚𝗶𝘁 𝗥𝗲𝗯𝗮𝘀𝗲 — 𝗪𝗵𝗮𝘁’𝘀 𝘁𝗵𝗲 𝗥𝗲𝗮𝗹 𝗗𝗶𝗳𝗳𝗲𝗿𝗲𝗻𝗰𝗲🤔 This is one of those topics that looks confusing at first, but becomes simple once you see the intent behind each. ⸻ Git Merge → Combines branches as they are → Preserves full history → Creates a merge commit Think of it like a group project — everyone does their work separately, and then everything is combined together. ⸻ Git Rebase → Moves your changes on top of another branch → Creates a clean, linear history → Avoids extra merge commits Think of it like rewriting your work in a clean notebook after seeing the latest version. ⸻ When to use what? • Use merge for shared branches (safe, history is preserved) • Use rebase for your local branches (cleaner commit history) ⸻ Simple takeaway: Merge → Safe, complete history Rebase → Clean, linear history Both are useful — the key is knowing when to use each. #Git #DevOps #VersionControl #SoftwareEngineering #CloudEngineering
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
-
-
You deleted the Deployment from Git. kubectl apply left it running anyway. kubectl apply only acts on resources passed to it. It has no model of what used to live in your namespace. last-applied-configuration tracks prior config of one object, not set membership. Server-side apply uses managed fields. Same scope. Git and cluster state drift. Silently. Three ways to fix it: 1. kubectl apply --prune -l app=myapp -f ./manifests Legacy allowlist mode, still alpha. Must apply all manifests at once. One missing label and you nuke prod. 2. KUBECTL_APPLYSET=true kubectl apply --prune --applyset=<name> ApplySet-based pruning. Still alpha. 3. GitOps with pruning on (Argo CD prune: true, Flux .spec.prune: true) Controller owns the diff. Removed from source equals removed from cluster. Off by default. Turn it on. A YAML manifest is desired state in theory. kubectl apply enforces it only for what's listed, not for what's missing. For true declarative ops, use a controller that reconciles the full set. 700+ DevOps Engineers read about outages in their inbox (instead of discovering them in Slack at 2 AM). 👉 https://lnkd.in/gvNrXSYK #Kubernetes #DevOps #GitOps #SRE #PlatformEngineering
To view or add a comment, sign in
-
-
🚨 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
-
-
If you've ever had to stare at a GitLab CI spinner for 30 minutes just for a typo fix, you know the pain. I got fed up with a bloated frontend deployment pipeline choking our productivity. It relied on heavy Webpack builds and fragile background processes. So, we tore it down and rebuilt it using Node 24, Vite, artifact-based deployments, and PM2. The damage? - Build times dropped from 30 minutes to 2 minutes - 95 hours of CI runner time saved every single month - Zero manual port cleanup required Just because a script works doesn't mean you shouldn't rethink it. I put together a quick write-up of the engineering decisions we made to make this happen, along with the YAML configs. Check out the full article here: https://lnkd.in/daWe8hQY Warning - Title could be clickbaity but mathematically true #DevOps #PlatformEngineering #TechDebt #Vite #GitLab
To view or add a comment, sign in
-
I made a manual change directly in my cluster to test something quickly. Flux reverted it within 60 seconds. At first I was annoyed. Then I realised that was exactly the point. Drift detection is a Flux feature that watches for any difference between what is in Git and what is actually running in the cluster. The moment it finds one it reconciles back to Git automatically. That means if anyone, including me, runs a manual kubectl edit or kubectl patch directly on a resource that Flux manages, Flux will undo it. Here is why that is a feature not a bug. In a real team environment someone will always make a quick manual change to fix something urgently. Without drift detection that change lives in the cluster but not in Git. Over time those undocumented changes accumulate. Nobody knows what is actually running anymore or why it differs from the repo. With drift detection Git is always the truth. Always. No exceptions. The discipline it enforces is uncomfortable at first. You cannot just tweak things directly anymore. Every change has to go through Git. But that discomfort is the whole point. It forces good habits and makes your infrastructure trustworthy. Have you ever had an environment drift so far from its config that nobody knew what was actually running? 👇 Follow me, I am documenting everything I build and learn in my home lab. #GitOps #Kubernetes #DevOps #FluxCD #CloudNative
To view or add a comment, sign in
-
Last week, a deployment broke. Not because of bad code. But because someone changed something manually. No one knew what changed. No one knew when. No one knew why. Sound familiar? This is exactly the problem GitOps solves. No manual changes. Ever. Everything is controlled through Git. You want to deploy? → Push code You want to change config? → Create PR You want rollback? → Revert commit Git becomes the single source of truth. No confusion. No hidden changes. No “who did this?” moments. Simple rule: If it’s not in Git, it doesn’t exist. Are you still making manual changes in production? #DevOps #GitOps #CloudComputing #Automation #Neoscript
To view or add a comment, sign in
-
🚀 From Code ➡️ Production in Minutes! Ever wondered how top teams ship features so fast & reliably? Here’s the magic behind it — CI/CD Pipeline 🔥 💻 Write code → ✅ Test → 🔄 Integrate → 📦 Build → 🚀 Deploy No chaos. No manual errors. Just smooth automation. ✨ Why it matters: ⚡ Faster releases 🛡️ Better code quality 🔁 Continuous improvements 🚀 Happy users = Happy devs This is not just a workflow… it’s a developer superpower 💪 #CI_CD #DevOps #SoftwareDevelopment #Automation #TechLife #Developers #Coding #GitHub #Jenkins #Docker #ContinuousIntegration #ContinuousDelivery #Programming #TechPost
To view or add a comment, sign in
-
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