nerdexam
Cisco

200-901 · Question #522

When changes are made to the same file across two branches, which git status is shown when the branches are combined?

The correct answer is C. conflict. When two branches modify the same lines of the same file and a merge is attempted, Git cannot automatically reconcile the differences. It marks the file as having a 'conflict' (merge conflict) and halts the merge, requiring manual resolution. The file is annotated with conflict…

Software Development and Design

Question

When changes are made to the same file across two branches, which git status is shown when the branches are combined?

Options

  • Aunmerged
  • Buncommitted
  • Cconflict
  • Dbranched

How the community answered

(49 responses)
  • A
    4% (2)
  • B
    2% (1)
  • C
    86% (42)
  • D
    8% (4)

Explanation

When two branches modify the same lines of the same file and a merge is attempted, Git cannot automatically reconcile the differences. It marks the file as having a 'conflict' (merge conflict) and halts the merge, requiring manual resolution. The file is annotated with conflict markers (<<<<<<, =======, >>>>>>>) showing both versions. 'Unmerged' is sometimes used informally but 'conflict' is the precise status shown by 'git status'. 'Uncommitted' and 'branched' are not git statuses related to this scenario.

Topics

#Git#Branching#Merging#Merge Conflicts

Community Discussion

No community discussion yet for this question.

Full 200-901 Practice