Back
Syntax
Study
Editor
Mode:
HTML
CSS
JavaScript
PHP
Reset
Run »
HTML / CSS / JS
# Start a merge that causes a conflict: git switch main git merge feature/header-redesign # CONFLICT (content): Merge conflict in src/Header.js # Git marks the conflict in the file: # <<<<<<< HEAD # <h1>My App</h1> # ======= # <h1>My Awesome Application</h1> # >>>>>>> feature/header-redesign # Resolve the conflict: # 1. Open the file in your editor # 2. Choose which version to keep (or write a combination) # 3. Delete ALL conflict markers: <<<<<<<, =======, >>>>>>> # After editing the file: # <h1>My Awesome Application</h1> # Mark the conflict as resolved: git add src/Header.js # Complete the merge: git commit # Git pre-fills: "Merge branch 'feature/header-redesign'" # See files with conflicts: git diff --name-only --diff-filter=U # Use a visual merge tool: git mergetool # To abort the merge and start over: git merge --abort
Result
Open