A conflict is a question, not a disaster
Yassine and Omar both changed the same heading differently. Git can combine many changes automatically, but it cannot decide which heading the team wants.
Git surrounds the competing text with three markers. The actual markers begin with <<<<<<<, ======= and >>>>>>>:
[current branch begins]
<h1>My software projects</h1>
[the two versions are separated]
<h1>Selected engineering work</h1>
[incoming branch ends]
These markers are not valid final content. They show the two versions that require a human decision.
Resolve slowly
- Read both versions.
- Revisit the requirement or speak with the teammate.
- Keep one version or write an agreed combination.
- Remove every conflict marker.
- Save the file.
- Run or inspect the project.
- Stage and commit the resolution.
git add index.html
git commit -m "Resolve navigation heading conflict"
git push
Do not automatically choose "ours" or "theirs" without understanding the intended result. Git detects overlapping text; people decide correct behavior.
The complete team workflow
1. Read one issue
2. git switch main
3. git pull
4. git switch -c feature/clear-name
5. Make and verify one focused change
6. git status and git diff
7. git add <chosen-files>
8. git diff --staged
9. git commit -m "Clear message"
10. git push -u origin feature/clear-name
11. Open a Pull Request
12. Review and correct on the same branch
13. Wait for required checks
14. Merge
15. Update local main and delete the branch
A complete collaboration example
Yassine creates an issue for a small interface improvement. Omar updates main, creates a branch named after that task and records one focused commit. He pushes the branch and opens a Pull Request explaining the change and its verification.
Yassine reviews the changed files and notices one missing keyboard behavior. Omar corrects it on the same branch and pushes a second commit. The Pull Request updates automatically. After the checks and review succeed, the team merges it, updates local main and removes the finished branch.
If both students had changed the same line, Git would display a conflict. The team would decide the intended content, remove the markers, verify the project and commit that decision.
What to remember
Collaboration is a sequence of visible decisions. Update shared work, isolate one task, record clear commits, propose a Pull Request, review evidence, resolve disagreements deliberately and merge only accepted work.