🌿Merge conflict
CONFLICT (content): Merge conflict in src/app/page.tsx Automatic merge failed; fix conflicts and then commit the result.
The same part of the same file was changed differently in two places, so Git doesn't know which one to keep.
🤔 Why does it happen?
- The same line was changed differently on two branches
- You changed the same spot on your computer before doing a pull
🔧 Try this
- Find the spots in the file marked with <<<<<<<, =======, >>>>>>>
- Pick which version to keep, or combine them, then delete the markers
- Save, then finish with git add → git commit
🤖 Ask your AI like this
I got the merge conflict below in Git. Please explain what each of the two versions of the conflicting file changed, and combine them so both changes are kept. Also tell me the git commands to run at the end. [Paste the full error here]
Replace the [ ] parts with your own situation, and paste the error with a few extra lines before and after it.
Related terms
Other errors in this group
- Push rejected
failed to push some refs (rejected) - GitHub authentication failed
Permission denied (publickey) - Not a git repository
fatal: not a git repository - Can't combine two different histories
fatal: refusing to merge unrelated histories - File too big to upload to GitHub
File exceeds GitHub's file size limit of 100.00 MB - Push blocked because it contains a secret key
Push cannot contain secrets (GH013)