Hands-on task
Resolve a merge conflict
In /root/repo, the file greeting.txt on branch main contains the line hey, while on branch other the same line is changed to goodbye. Both branches edit the same line, so the merge will produce a conflict.
While on main, merge the other branch, resolve the conflict so that greeting.txt contains exactly one line reconciled (without conflict markers), and finish the merge with a commit. As a result, HEAD on main should become a merge commit (with two parents), and the repository should exit the merging state.
The conflicted file is handy to edit in the Editor tab: it highlights both versions and the markers.
- git merge
- conflict resolution
- merge commit
- git add
- git commit