- Knowledge
- technology
- OOP
- Tips
- Programming
- Tips
- Tutorial
- SEO
- Ranking
- Knowledge
- Special Day
- Seo
- Bug
- Data science
- Seo
- artificial intelligence
- Machine Learning
- Robotics
- happyNewYear2021
- newYearEve
- 2021
- Automation
- Smart Home
- Career
- Best Practices
- Git
- Logging
- Web Fundamentals
- DNS
- HTTPS
- Performance
- AI Tools
- ChatGPT
- Claude
- Gemini
- Laravel
- Eloquent
- MySQL
- HTTPS
- TLS
- Web Security
- Certificates
- Developer Life
- Debugging
- Docker
- DevOps
- Transactions
- Queues
- LLMs
- AI
- AI Coding
- Developer Tools
- React Native
- Expo
- Kate PMS
- Mobile Apps
- Laravel
- Authentication
- Sanctum
- Cookies
- API Design
- Payments
- Idempotency
- DeepSeek
- Open Source AI
- LLMs
- AI News
- Git
- Version Control
- AI Coding
- Prompting
- PHP
- Checklist
- MCP
- AI Agents
- OpenAI
- Architecture
- Microservices
- Modular Monolith
- Estimation
- Developer Life
- Project Planning
- Humour
- OAuth
- OpenID Connect
- Authentication
- Embeddings
- Vector Search
- RAG
- pgvector
- OpenAI
- GPT-4.1
- Codex CLI
- Events
- Testing
- Clean Code
- Maintainability
- Code Review
- Webhooks
- API
- Security
- Claude Code
- Workflow
- AI
- LLM
- Prompt Injection
- Mobile
- React
- Networking
- TCP
- UDP
- HTTP/3
- CLAUDE.md
- AWS
- Cloud Security
- Backups
- PHPUnit
- Software Engineering
- Leadership
- Communication
- RAG
- Embeddings
- AI Engineering
- IT Infrastructure
- Networking
- Access Control
- CI/CD
- GitHub Actions
- Gemini CLI
- Claude Code
- JavaScript
- Async/Await
- Node.js
- Promises
- Security
- Cryptography
- Passwords
- MySQL
- Database
- Vibe Coding
- Software Quality
- DNS
- Code Reading
- Onboarding
- Productivity
- Background Jobs
- Developer Humour
- Estimates
- Dev Life
- JWT
- o3-mini
- DeepSeek R1
- Rate Limiting
- Kate PMS
- E-Signing
- Audit Trail
- REST
- GraphQL
- API Design
- Laravel 12
- Upgrade Guide
- Open Source
- Self-Hosting
- Task Scheduling
- Cron
- Secrets
- CORS
- PHP
- PHP-FPM
- OPcache
- GitHub Copilot
- Software Architecture
- Engineering
- TypeScript
- JavaScript
- Type Safety
- AI Security
- React Native
- Product Design
- AI Agents
- Kiro
- Queues
- Redis
- RabbitMQ
- AWS SQS
- Nginx
- Apache
- GPT-5
- gpt-oss
- Clean Code
- Architecture
- Naming
- Documentation
- Career
- ADR
- Teamwork
- Supply Chain
- Kate HRM
- HR Software
- Permissions
- System Design
- Pagination
- SSH
- Linux
- Big O
- Databases
- Laravel Boost
- MCP
- Developer Skills
- Validation
- Databases
- Indexes
- Code Quality
- Deployment
- Developer Humour
- Feature Flags
- Code Review
- Pull Requests
- Docker
- Cursor
- Authorization
- RBAC
- Gemini
- Long Context
- PHP 8.4
- Caching
- Dependency Injection
- Web Performance
- Browser
- CSS
- Database
- Migrations
- ChatGPT
- AI for Developers
- Monitoring
- On-Call
- REST
- Backend
- SQL
- NoSQL
- Database Design
- Coding Agents
- Claude 4
- API Resources
- REST API
- Load Balancing
- Scaling
- AWS
- AI Tools
- Claude
- Sora 2
- CTE
- 2FA
- TOTP
- Programming Languages
- Prompts
- Developer Workflow
- API Gateway
- APIs
- Passport
- API Auth
- Learning
- Burnout
- Developer Growth
- Web Development
- SEO
- Kate Mall
- ChatGPT Atlas
- Agent Skills
- Middleware
- Laravel 12
- Collections
- Context Window
- Monitoring
- Commit Messages
- Self Review
- Growth
- Regex
- Programming Basics
- Text Processing
- Database Design
- Normalization
- Linux
- Server Security
- Linux Foundation
- Open Standards
- Legacy Code
- Documentation
- AI Workflow
- File Uploads
- Test Data
- Hashing
- Performance
- Caching
- Enums
- Scope Creep
- Estimation
- Codex
- Gemini CLI
- Timezones
- Carbon
- Bugs
- PHP 8.5
- Gemini 3
- GPT-5.1
- Data Integrity
- Event Loop
- Async
- Opus 4.5
- AI Models
- React
- Forms
- Frontend
- Backups
- AI Images
- DALL-E
- Midjourney
- Race Conditions
- Concurrency
- Legacy Code
- Refactoring
- Senior Engineer
- Scope
- LLM
- CDN
- Web
- Sub-Agents
- Soft Deletes
- Audit Log
- Concurrency
- AI Learning
- NestJS
- AI Evals
- Policies
- SPF DKIM DMARC
- Unicode
- UTF-8
- Knowledge Graph
- Value Objects
- Technical Debt
- Feature Flags
- Laravel Pennant
- Deployment
- Copilot
- Composer
- Dependencies
- Artisan
- Automation
- AWS S3
- Object Storage
- Cloud
- Small Language Models
- Ollama
- Production
- Sessions
- HTTP
- Mentoring
- SQL
- Virtual Machines
- Web Development
- HTTP/2
- QUIC
- Web Performance
- AI Integration
- LLM API
- SOLID
- OOP
- Hosting
- Serverless
- Merge Conflicts
- Temperature
- AI Development
- Reverse Proxy
- Nginx
- Infrastructure
- Verification
- Passkeys
- WebAuthn
- Teams
- Communication
- Stakeholders
- Monorepo
- CI/CD
- Versioning
- JSON Schema
- Livewire
- Inertia
- Meetings
- Distributed Systems
- Privacy
- Full-Stack
- T-Shaped Skills
- Money
- Notifications
- Web Security
- HTTP Headers
- CSP
- Function Calling
- Load Testing
- k6
- Data Extraction
- Debugging
- WebSockets
- SSE
- Real-Time
- Laravel Reverb
- Infrastructure as Code
- Terraform
- Side Projects
- Laravel Pint
- OpenAPI
- Swagger
- UX
- Multimodal
- Jest
- Pair Programming
- APIs
- Rate Limiting
- Resilience
- Dev Humour
- Design Tokens
- JWT
- API Keys
- Sessions
- PHPStan
- Rector
- Incidents
- Reporting
- Dashboards
- Zero Trust
- IAM
- Search
- Laravel Scout
- Junior Developers
- Mentoring
- Images
- WebP
- AVIF
- Bug Reports
- Let's Encrypt
- Design Docs
- Software Design
- Observers
- Replication
- Accountability
- Data Structures
- Reliability
- LLM Memory
- Error Handling
- Payments
- Payment Gateway
- Webhooks
- PCI DSS
- Observability
- OpenTelemetry
- Personal Brand
- Writing
- Conventions
- Dates
- Scheduling
- Disaster Recovery
- Compression
- Brotli
- Deadlines
- Developer Habits
- State Machines
- Tech Roles
- UUID
- ULID
- Horizon
- Planning
- Engineering Culture
- Ownership
- Soft Skills
- Socialite
- Cost Control
- Collations
- Unicode
- Octane
- PostgreSQL
Me vs the Merge Conflict: A Drama in Five Acts
About Post
Some battles you choose. The merge conflict chooses you, usually at about five o'clock, usually on the branch you promised would be "ready in ten minutes".
Here's how it goes, in five acts. You've probably performed in this play yourself.
Act 1: Confidence
The feature is done. Tests pass locally. You've been on this branch for, let's say, a while. Two weeks. Maybe three. Time is a social construct.
You type git pull --rebase origin main with the calm of someone who has never been hurt before.
Act 2: The wall of angle brackets
CONFLICT (content): Merge conflict in app/Services/RentService.php
CONFLICT (content): Merge conflict in routes/api.php
CONFLICT (content): Merge conflict in composer.lock
error: could not apply 3f2c1ab... Add rent reminders
❌ The file you barely touched has conflicts.
❌ composer.lock has conflicts, which is like being asked to merge two phone books by hand.
❌ routes/api.php has conflicts because two people added a route on the same line at the end of the file.
Act 3: The investigation
You open RentService.php. Between <<<<<<< and >>>>>>> lies a mystery. Your version calls calculateDue(). Their version calls calculateAmountDue(). Someone renamed the method. In fact, someone renamed half the class and reformatted the rest.
❌ You run git blame to find the culprit. It's a formatting commit. The author is you, from a different branch, last month.
Act 4: The bargaining
You try git checkout --ours. Then you remember you're in the middle of a rebase, where "ours" and "theirs" swap meanings. (During a rebase, --ours is the branch you're rebasing onto and --theirs is your own commits. Nobody has ever remembered this on the first try.)
❌ You consider git rebase --abort, deleting the folder, cloning again and pretending none of this happened.
Act 5: Resolution
An hour later, everything compiles. You run the tests. Something unrelated fails, because the conflict was resolved "correctly" in both files but the logic between them no longer agrees. Git can only see lines. It has no idea what your code means.
You fix it, push, and write "resolve conflicts" as the commit message, which is the developer equivalent of a long sigh.
What actually makes merge conflicts boring
Conflicts aren't a Git problem. They're a time and communication problem. The longer two people change the same code without seeing each other's work, the bigger the bill when they finally meet.
✅ Small pull requests. A branch that lives for a day collides with far less than a branch that lives for three weeks. If a feature is big, ship it in slices, behind a feature flag if needed.
✅ Sync with main often. Run git fetch and rebase or merge main into your branch every day, not just at the end. Ten small conflicts spread over a week are easy. One giant conflict on Friday is not.
✅ Talk before you touch shared code. "I'm renaming methods in RentService this afternoon" in the team chat costs five seconds and saves someone an hour.
✅ Keep formatting out of feature work. Run your formatter (Pint, Prettier) across the codebase once, in its own PR, and enforce it in CI. Then style changes never sneak into real diffs.
✅ Show the original, not just two versions. git config --global merge.conflictStyle zdiff3 adds the common ancestor to each conflict, so you can see what both sides changed from. It makes conflicts far easier to read.
✅ Let Git remember your fixes. git config --global rerere.enabled true records how you resolved a conflict and reapplies it if the same conflict shows up again, which happens a lot during long rebases.
✅ Don't hand-merge lock files. Take main's composer.lock or package-lock.json, then re-run the composer require or npm install for the package you added. Let the tool rebuild it.
✅ Run the tests after resolving. A clean merge isn't the same as working code.
The rule: the size of a merge conflict grows with how long your branch lives. Merge small, sync daily, and say out loud when you're about to touch shared code.
Merge conflicts will never disappear completely, and that's fine. The goal is to make them small enough that resolving one is a two-minute task, not a story you tell other developers.
What's the worst file you've ever had to resolve a conflict in? I'll nominate any lock file, ever.

Be first to comment it...