← Git & GitHub learning pathGit & GitHub · Module 5 of 10
Merging and conflicts
Combine branches and resolve conflicts.
📖 Key ideas
- git merge feature brings changes into the current branch.
- Fast-forward merges just move the pointer.
- Conflicts happen when the same lines change differently.
- Conflict markers: <<<<<<<, =======, >>>>>>>.
- Edit, keep the right code, then git add and git commit.
💡 Real-life example: A merge conflict is two editors changing the same sentence; a human decides the final wording.
MergeCombines branch histories
Fast-forwardMerge by moving the branch pointer
ConflictCompeting changes to the same lines
Conflict markersLines showing both versions