Skip to main content
Test Double company logo
Services
Services Overview
Holistic software investment consulting
Software Delivery
Accelerate quality software development
Product Management
Launch modern product orgs
Legacy Modernization
Renovate legacy software systems
DevOps
Scale infrastructure smoothly
Upgrade Rails
Update Rails versions seamlessly
Technical Recruitment
Build tech & product teams
Technical Assessments
Uncover root causes & improvements
Case Studies
Solutions
Accelerate Quality Software
Software Delivery, DevOps, & Product Delivery
Maximize Software Investments
Product Performance, Product Scaling, & Technical Assessments
Future-Proof Innovative Software
Legacy Modernization, Product Transformation, Upgrade Rails, Technical Recruitment
About
About
What's a test double?
Approach
Meeting you where you are
Founder's Story
The origin of our mission
Culture
Culture & Careers
Double Agents decoded
Great Causes
Great code for great causes
EDI
Equity, diversity & inclusion
Insights
All Insights
Hot takes and tips for all things software
Leadership
Bold opinions and insights for tech leaders
Developer
Essential coding tutorials and tools
Product Manager
Practical advice for real-world challenges
Say Hello
Test Double logo
Menu
Services
BackGrid of dots icon
Services Overview
Holistic software investment consulting
Software Delivery
Accelerate quality software development
Product Management
Launch modern product orgs
Legacy Modernization
Renovate legacy software systems
Cycle icon
DevOps
Scale infrastructure smoothly
Upgrade Rails
Update Rails versions seamlessly
Technical Recruitment
Build tech & product teams
Technical Assessments
Uncover root causes & improvements
Case Studies
Solutions
Solutions
Accelerate Quality Software
Software Delivery, DevOps, & Product Delivery
Maximize Software Investments
Product Performance, Product Scaling, & Technical Assessments
Future-Proof Innovative Software
Legacy Modernization, Product Transformation, Upgrade Rails, Technical Recruitment
About
About
About
What's a test double?
Approach
Meeting you where you are
Founder's Story
The origin of our mission
Culture
Culture
Culture & Careers
Double Agents decoded
Great Causes
Great code for great causes
EDI
Equity, diversity & inclusion
Insights
Insights
All Insights
Hot takes and tips for all things software
Leadership
Bold opinions and insights for tech leaders
Developer
Essential coding tutorials and tools
Product Manager
Practical advice for real-world challenges
Say hello
Developers
Developers
Developers
Software tooling & tips

How to handle Git conflicts with empathy and care

Got a Git conflict? Stay calm and follow our empathetic approach to resolving code overlaps. Your code—and your colleagues—will thank you!
Kevin Baribeau
|
January 24, 2016
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

We’ve all seen this story. You’ve worked hard on some cool new stuff and are ready to push, but the universe has other ideas.

BBZZZT!

Conflict!

What do you do?

Take a deep breath

I know you thought you were finished, but the worst thing you can do is rush through this last bit. There’s a good chance resolving this conflict is going to be difficult. The stakes are high. There’s a good chance you’ll break your cool new feature here. Not only that, but someone else worked hard too, and you don’t want to break their stuff either.

So take a breath and make sure you’re ready to concentrate a bit and get this next part right.

‍

Read the other commit

Ok, you know what your change was, but what’s this conflict about? The reason you’ve got a conflict is that someone else made a change that overlaps with your changes (omg, what a jerk!). Angry as you might be, the appropriate reaction here is empathy. What was this other person trying to accomplish? What will it look like if it breaks?

If you can’t answer these questions, you’ll need help. Ask the author of the other commit. Pair on the rest of the resolution if that’s your thing.

‍

Resolve the conflict

This is the part you press some buttons in your editor. It’s something you need to get good at, but it’s not very interesting. Take a look here if you’re having trouble.

Once you’ve pushed all the necessary buttons, let’s move on.

‍

Re-test both changes

So the hard part’s done. You’ve got an understanding of both changes and how they need to work together, but the important part is here. In a vacuum, the risk of something breaking here is about equal between your changes and that pesky “other commit”. It’s tempting to re-test only your changes, and to forget about that other commit (or worse, to skip testing altogether, which is especially tempting if you didn’t stop to take a breath).

If you’ve got an automated test suite here, that’s great. Run it. But also be aware that no test suite is perfect; and not everyone tests things the same way that you do. The “someone else” who made “that other commit” can tell you what tests they used. Ask them about it. Ideally you want to repeat whatever they did (automated or not). Practically there might be some shortcuts, but two people can do a better job of making that judgement call than one.

If you didn’t ask for help, ask for review

I said to ask for help, right? You should ask for help.

Even if you don’t think you need help, whoever wrote that other commit will know their side of the story better than you do. Better to at least let them know you made changes in an area that they touched last. They won’t be mad, I promise. Heck, they might even do some testing for you.

Related Insights

🔗
Speaking human: Engineers who communicate effectively with empathy
🔗
How to improve empathy: Practical steps and insights
🔗
Why our hiring process is focused on value alignment and empathy

Explore our insights

See all insights
Developers
Developers
Developers
You’re holding it wrong! The double loop model for agentic coding

Joé Dupuis has noticed an influx of videos and blog posts about the "correct" way of working with AI agents. Joé thinks most of it is bad advice, and has a better approach he wants to show you.

by
Joé Dupuis
Leadership
Leadership
Leadership
Don't play it safe: Improve your continuous discovery process to reduce risk

We often front-load discovery to feel confident before building—but that’s not real agility. This post explores how continuous learning reduces risk better than perfect plans ever could.

by
Doc Norton
Leadership
Leadership
Leadership
How an early-stage startup engineering team improved the bottom line fast

A fast-growing startup was burning cash faster than it could scale. Here’s how smart engineering decisions helped them improve the bottom line.

by
Jonathon Baugh
Letter art spelling out NEAT

Join the conversation

Technology is a means to an end: answers to very human questions. That’s why we created a community for developers and product managers.

Explore the community
Test Double Executive Leadership Team

Learn about our team

Like what we have to say about building great software and great teams?

Get to know us
Test Double company logo
Improving the way the world builds software.
What we do
Services OverviewSoftware DeliveryProduct ManagementLegacy ModernizationDevOpsUpgrade RailsTechnical RecruitmentTechnical Assessments
Who WE ARE
About UsCulture & CareersGreat CausesEDIOur TeamContact UsNews & AwardsN.E.A.T.
Resources
Case StudiesAll InsightsLeadership InsightsDeveloper InsightsProduct InsightsPairing & Office Hours
NEWSLETTER
Sign up hear about our latest innovations.
Your email has been added!
Oops! Something went wrong while submitting the form.
Standard Ruby badge
614.349.4279hello@testdouble.com
Privacy Policy
© 2020 Test Double. All Rights Reserved.