Chuck's Academy

Conflict Resolution in Git

Conflict Resolution in the Command Line

Resolving conflicts in Git using the command line can be a straightforward process if you know the appropriate commands and follow a series of well-defined steps. In this chapter, we will explore how to identify, resolve, and mark conflicts as resolved from the command line.

Identifying Conflicts

Suppose you are trying to merge a feature branch into main:

bash

Git will indicate if it finds conflicts:

Viewing Conflict Status

To see the files in conflict, use:

bash

Expected output:

Resolving Conflicts Manually

Open the conflicting file (archivo.txt). You will see conflict markers indicating the different versions:

plaintext

Ask me anything