A SaaS team had a memory leak. Somewhere in the last 300 commits over six weeks. Too many to inspect manually. A senior engineer wrote a 10-line test script and ran: $ git bisect run ./memory_test.sh Git performed binary search automatically. Checked out the midpoint commit. Ran the script. Narrowed the range. Repeated. 40 minutes later: first bad commit found. A dependency update with a caching layer and no eviction policy. The manual version you can use right now: $ git bisect start $ git bisect bad # current commit is broken $ git bisect good v2.3.0 # this version worked Git checks out the midpoint. You test it. Then: $ git bisect good (or bad) Repeat. In 1,000 commits: found in 10 rounds. $ git bisect reset # always run this when done The only requirement: your commits need to be testable in isolation. This is why atomic commits matter. This is why "WIP" commit messages hurt you months later. Every messy commit today is a future investigation hour. 📚 Chapter 7 of Stop Breaking Git. #Git #Debugging #SoftwareEngineering #DevOps #BestPractices
Fixing Memory Leaks with Git Bisect
More Relevant Posts
-
I automated my entire deployment pipeline in one weekend. Here's the stack. Before: Manual SSH, manual build, pray nothing breaks, 45 minutes per deploy. After: Git push, CI runs, tests pass, auto-deploy. 3 minutes. The stack: 1. GitHub Actions for CI Every push triggers: lint, type-check, unit tests, build. If anything fails, it blocks the merge. No exceptions. 2. Vercel for preview deployments Every PR gets its own URL. QA happens on the actual build, not localhost. Game changer for catching environment-specific bugs. 3. Environment-based configs Dev, staging, production — each has its own env vars, API keys, and database connections. No more "works on my machine." 4. Rollback in 30 seconds Vercel keeps every deployment. If production breaks, one click reverts to the last good build. No downtime. The ROI: - 45 min deploys → 3 min deploys - 0 "forgot to build" incidents since setup - Confidence to ship daily instead of weekly The best infrastructure is the kind you forget exists. What's in your deployment pipeline? Not financial advice. #DevOps #CI #GitHub #Automation #Deployment #SoftwareEngineering #FullStack #WebDevelopment
To view or add a comment, sign in
-
-
Day 102. Less theory. More breaking things. Yesterday I talked about DAGs and snapshots. Today I actually felt them. Went full practical. Here's what hit me: Error 1: Detached HEAD Checked out an old commit to inspect something. Forgot to create a branch. Made changes. Committed. Then switched branches and watched those commits disappear into the void. The graph doesn't lie. Floating commits with no branch pointing to them just... drift. Error 2: Merge conflict on main Two branches touched the same file. Git couldn't decide whose version wins. The <<<<<<< markers showed up and I actually read them this time instead of panicking. Resolved it manually. Committed the merge. Moved on. Error 3: reset --hard on the wrong branch Yeah. I typed the command on the branch I didn't mean to. Work gone. No staged changes. No warning. Lesson? git reflog saves lives. Every commit still lives in there for 30 days even after a hard reset. Error 4: Pushed to the wrong remote branch Force of habit. Wrong branch name. Had to git push origin --delete and clean it up. Not glamorous. But this is what sharpening actually looks like. Day 102. Still here. #Git #DevOps #100DaysOfCode #LearningInPublic #Infracodebase
To view or add a comment, sign in
-
-
What actually happens between git push and your app going live in production? Most engineers know CI/CD as a concept. Very few know exactly what fires, when, and why. Here is the complete flow — step by step: STEP 1 — Code commit Developer pushes to a feature branch. A webhook fires immediately. Your pipeline wakes up. STEP 2 — Build Source code is compiled. Dependencies are resolved. If this fails, nothing else runs. STEP 3 — Unit tests Every test in your codebase runs automatically. One failure stops the pipeline cold. No exceptions. STEP 4 — Static code analysis (SAST) SonarQube scans for bugs, vulnerabilities, and code smells. A quality gate defines what passes. STEP 5 — Docker image build The application and all its dependencies are packaged into an immutable container image. Tagged with the commit SHA. STEP 6 — Image push to registry The image is pushed to ECR or DockerHub. This is the artifact that will be deployed everywhere. STEP 7 — Deploy to staging The new image is automatically deployed to a staging Kubernetes cluster. No manual steps. STEP 8 — Integration tests Tests run against the live staging environment. Real HTTP calls, real database, real assertions. STEP 9 — Approval gate A human reviews and approves. One click. STEP 10 — Production deploy ArgoCD detects the approved image tag in Git and deploys to production. Zero downtime rolling update. Total time: 8–15 minutes. Manual process equivalent: 2–3 hours. #DevOps #CICD #Jenkins #Kubernetes #Automation #SoftwareEngineering #CloudEngineering
To view or add a comment, sign in
-
-
Level Up Your CMake Game: Essential Resources for Modern C++ Builds Just revisited Craig Scott's "Professional CMake: A Practical Guide" (22nd Ed, 2026) 📚 — and it remains the gold standard for anyone serious about CMake. > Target-based design over legacy global commands > Modern target_* patterns with proper PUBLIC/PRIVATE/INTERFACE usage > Real-world guidance on testing, packaging, Qt, cross-compilation & performance > Free "Getting Started" guide available: https://lnkd.in/gTNh-KuV But don't stop there. Here are other trusted CMake best-practices resources I recommend: >> An Introduction to Modern CMake by Henry Schreiner — concise, living docs with clear "do this, not that" guidance cliutils.gitlab.io >> Effective Modern CMake — gist with actionable rules like "Forget add_compile_options; use target_compile_options" GitHub >> CMake Best Practices (Packt) — production-tested patterns for modular, scalable projects GitHub >> NERSC Modern CMake Training — great for performance portability & generator expressions www.nersc.gov >> Official CMake Docs — surprisingly excellent when you use the version toggle & search: https://lnkd.in/gnrsJbv8 cmake.org Pro Tip: Set cmake_minimum_required(VERSION 3.24) (or higher) and always specify a maximum version you've tested. CMake dumbs itself down to your minimum—don't let legacy constraints hold your project back cliutils.gitlab.io. Whether you're migrating from Make, onboarding a team, or just tired of cryptic build errors: invest in learning Modern CMake. Your future self (and your CI pipeline) will thank you. What's your go-to CMake resource? Drop a comment! #CMake #CPlusPlus #BuildSystems #DevOps #SoftwareEngineering #ModernCMake #Cpp #DeveloperTools #ContinuousIntegration
To view or add a comment, sign in
-
⚡ Git for Agents: Cloudflare’s Artifacts I just read Cloudflare’s latest post: Artifacts: versioned storage that speaks Git — and it’s a fascinating look at how source control is evolving for the agentic era. 🔹 The challenge: Agents are generating more code than ever — far beyond what traditional source control systems were designed for. 🔹 The solution: Cloudflare introduces Artifacts, a distributed, versioned filesystem built for agents. -Create repos programmatically for every agent session or sandbox. -Fork, time-travel, and persist state seamlessly. -Expose repos via Git, REST APIs, or Workers APIs. 🔹 Under the hood: - Built on Durable Objects for massive scale. - A Git server written in Zig, compiled to WASM. - Supports millions of repos per namespace. - ArtifactFS for mounting large repos quickly, shaving minutes off startup times. ⚖️ Takeaway: Artifacts isn’t just source control — it’s a new primitive for the agentic web. By speaking Git, it leverages what agents already know, while scaling to workloads humans never imagined. 📌 Credit: Original blog by Cloudflare — “Artifacts: versioned storage that speaks Git”- https://lnkd.in/gGM2qndk 💬 Curious to hear your thoughts: Do you see Git-based primitives like this becoming the backbone of agent-driven development? #Git #DevTools #SoftwareEngineering #VersionControl #OpenSource #ZigLang #WASM #FutureOfWork #AIagents #Automation #Cloudflare #TechInnovation
To view or add a comment, sign in
-
Goodbye, Manual Deployment! 👋 | Continuous Integration and Deployment using GitHub Actions & Hostinger I am delighted to announce the successful setup of an automated CI/CD pipeline for my most recent React application! 🚀 Prior to doing this, my deployment process involved steps such as: 1. Building locally. 2. Accessing FTP or the File Manager interface. 3. Uploading the contents of the dist folder manually. 4. Hoping to God I did not forget any files! 😂 Now, however, with the use of GitHub Actions, my workflow involves the following: ✅ Automation of the Build Process: Each commit to the code base generates a build within the virtual environment. ✅ Intelligent Sync Process: All production-relevant files are automatically synchronized to my Hostinger server using FTP. ✅ Lightning-Fast Deployment: My changes are live on the web in less than 2 minutes without human intervention. Aside from saving me time, the process helped me gain further insight into DevOps automation and how it can transform a developer’s workflow. 💻✨ More automation coming up next! 🛠️ #WebDevelopment #ReactJS #GitHubActions #CICD #DevOps #Automation #Hostinger #SoftwareEngineering #ContinuousDeployment
To view or add a comment, sign in
-
-
🔁 Why CI? Because "I'll test it later" is a Lie Title/Hook: "Pushed to main without tests? That's not confidence. That's gambling." CI (Continuous Integration) = every push triggers automated tests. Here's my GitHub Actions pipeline: Push to main → CI runs Installs dependencies (npm ci) Injects secrets (DB URI, JWT secret) Runs integration tests against a real database ❌ Fails? → No deployment. Fix it first. ✅ Passes? → Ready for production. Why it matters: You catch bugs before users do You can't "forget" to test Every merge is verified, not just reviewed CI isn't about fancy tooling. It's about building trust in your codebase. Your code is only as reliable as your worst-tested commit. #CI #GitHubActions #Testing #BackendEngineering #DevOps #git #softwareEngineering
To view or add a comment, sign in
-
-
Git by itself will happily let you commit: ▪️ Ugly formatting ▪️ Failing code ▪️ Secrets ▪️ Broken configs It doesn't assess quality; it just stores snapshots, which is why automation is vital within teams to catch problems early. There are 3 Key Layers: 1️⃣ .gitignore Your first line of defence, it prevents you from tracking sensitive information by telling Git what not to track: ▪️.env files (secrets) ▪️Dependencies ▪️Logs ▪️System Files If set up properly, a lot of problems can be prevented. 2️⃣ Pre-commit hooks A hook is a script that git will run automatically at select points in the git workflow. One of the points is before a commit is created... If it passes these checks, the commit will go through If it fails, the commit will be blocked These checks include: ▪️Linters (code quality) ▪️Tests (does it still work?) ▪️Secret scanning This layer stops bad code before it enters your repo history. But its not perfect and must not be solely relied on. 3️⃣ CI - Continuous Integration This set of checks runs after you push your code CI will: ▪️Run tests ▪️Check formatting ▪️Scan for secrets ▪️Build the project If something fails, your PR will be blocked. The issue here is that it runs after the commit already exists, so the secret is already in history, but the PR won't be merged; warnings will show, and the team will be notified. All 3 are needed to ensure that rules are consistent, checks are automatic, and fewer mistakes reach PRs or the main. If all is well, then the PR will be approved. A Pull Request isn't just a click merge button... It acts as a checkpoint: ▪️Reviews the code ▪️Catches mistakes ▪️Enforces standards A proper workflow: ( *simplified) *Feature Branch ➡️ PR ➡️ Review ➡️ Merge Git doesn't protect you - these layers and check do. #Git #CoderCo #DevOps
To view or add a comment, sign in
-
-
Hello, I’ve been revisiting the Conventional Commits standard and it’s surprisingly powerful. It helps you: - Make commit messages clear and consistent - Automate changelogs and versioning - Understand changes instantly (feat, fix, breaking change…) Simple habit, real impact. If you’re not using it yet, it’s worth a look: https://lnkd.in/dKxMqKNb #git #softwareengineering
To view or add a comment, sign in
-
Friday Deployments: The Ultimate Cursed Technique 💀 Ah, the arrogance of mortal developers. You think your unit tests passing in a local environment means you are invincible? Then you invoke the most forbidden technique of all: Deploying to Production on a Friday at 5 PM. I have seen kingdoms fall for less. You merge your pull request, thinking you are a prodigy, only to watch your servers ignite. Memory leaks, unhandled exceptions, and that one microservice that inexplicably decided to die. Your weekend? Gone. Reduced to ashes. You call it an "unexpected edge case." I call it your inevitable doom. True power isn't just writing code; it’s knowing when to execute it. A wise engineer respects the production environment. A foolish one summons technical debt just before the weekend. If you insist on testing your luck, by all means, hit deploy. But don't come crying when you're trapped in an endless Domain Expansion of incident reports and Slack pings. Choose your deployments wisely. — The King of Curses
To view or add a comment, sign in
More from this author
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