This interactive demo was created free with Storylane in 2 minutes. Create your own demo
This interactive demo was created free with Storylane in 2 minutes. Create your own demo
Start free
All Tutorials /GitHub

How to Resolve Conflicts in GitHub

Updated on:
June 5, 2026
By:
Madhav Bhandari
Use this interactive demo to learn how to fix merge conflicts in a GitHub repository step by step.

Quick summary

This demo walks you through how to resolve merge conflicts in GitHub Desktop by choosing which changes to keep, discarding unwanted edits, and pushing a clean commit to your repository. It covers the full conflict resolution workflow from opening a conflicted repository to verifying and pushing the final changes.


Steps

  1. Go to your current repository with existing conflicts.
  2. Click on the conflicting line numbers you don't want to keep — choose which changes to keep or combine them manually.
  3. For a file with a conflict you want to remove entirely, uncheck the file and click the Discard Changes option.
  4. Click the Discard Changes button to confirm removal of the unwanted file changes.
  5. Click Commit to master to save your resolved conflict as a new commit.
  6. Click the changed file and select Discard Changes to remove any remaining unwanted edits.
  7. Click the Discard Changes button again to finalize the removal.
  8. Click Push origin to upload and save all resolved changes to the remote repository.
  9. Click Open this repository to verify the resolved state in your file browser.
  10. Open the file and check everything to confirm the conflict resolution is complete.
  11. After resolving conflicts and pushing changes, test the functionality of your code to ensure everything works as expected.

📌 Why this matters

Merge conflicts are one of the most disruptive bottlenecks in collaborative software development, causing delays and errors when multiple contributors edit the same files. Knowing how to resolve GitHub conflicts quickly — by selecting the correct changes, discarding unwanted edits, and committing a clean merge — keeps development pipelines moving and reduces broken builds. This workflow is essential for any team using Git-based version control, whether working on open-source projects or enterprise codebases. Mastering conflict resolution in GitHub Desktop helps developers maintain code integrity and ship features faster without manual errors.
Your product deserves an interactive demo
Start free
Similar Articles
GitHub

How to Import a Project from GitHub to Replit

Madhav Bhandari
Director of Marketing @ Storylane
GitHub

How to Push Code from Replit to GitHub

Madhav Bhandari
Director of Marketing @ Storylane
GitHub

How to Connect Replit to GitHub

Madhav Bhandari
Director of Marketing @ Storylane
No items found.
Platform
Interactive Demos
Sandbox Demos
Hubs
RepX
Integrations
Solutions
Product Marketers
Growth & Demand Gen
Sales Reps & AEs
Presales & SEs
Customer Success
Product Managers
Customers
Demo Showcase
Customer Stories
Finer Demos Club
Features
Demo Signals
Personalization
Deal Intelligence
Resources
Blog
The Plot
Tutorials
Help Docs
What’s New
Demo Dundies
Company
Careers
Pricing
Partners
Contact
Trust Center
Backed by
Chrome Extension Icon
Chrome extension
Download
Desktop app
Download
Built in San Francisco Bay Area - ©2026 Storylane
Privacy PolicyTerms & Conditions
X Corp (formerly Twitter)LinkedIn
This website uses cookies to ensure you get the best experience on our website. Learn More
Got it
This website uses cookies to ensure you get the best experience on our website. Learn More
Got it