# How to Resolve Conflicts in GitHub

> To resolve conflicts in GitHub, go to your repository, select changes to keep or combine manually, discard unwanted changes, commit to the master branch, and push the origin to save your work before testing the code functionality.

Canonical: https://livedemo.ai/tutorials/how-to-resolve-conflicts-in-github/
Apps: GitHub
Updated: 2026-10-05
Interactive demo: https://story-api.livedemo.ai/workspaces/62255d3d3304f17b8f5e2d03/stories/692a4c8aab56e05a00ff80ca/preview?step=1

## Steps

1. Go to your current repository with existing conflicts.
2. Click on the numbers that you don't want to keep. Choose which changes to keep or combine them manually.
3. This file also has a conflict but you can just uncheck the file and click on the 'Discharge Changes' option.
4. Click on the 'Discard Changes' button.
5. Click 'Commit to master'.
6. Click on the changed file and click 'Discard Changes'.
7. Click on the 'Discard Changes' button.
8. Click on the 'Push origin' to save the changes.
9. Click 'Open this repository'.
10. Open the file and check everything.
11. After resolving conflicts and pushing the changes, it's always a good idea to test the functionality of your code to ensure everything works as expected.
