FC ConcursosFC Concursos

Questão FC586529

Advanced Merging in GIT Merging in Git is typically fairly easy. Since Git makes it easy to merge another branch multiple times, it means that you can have a very long lived branch

Questões Interdisciplinares de Inglês

Instituto AOCP · 2018

Advanced Merging in GIT

Merging in Git is typically fairly easy. Since Git makes it easy to merge another branch multiple times, it means that you can have a very long lived branch but you can keep it up to date as you go, solving small conflicts often, rather than being surprised by one enormous conflict at the end of the series.

However, sometimes tricky conflicts do occur. Unlike some other version control systems, Git does not try to be overly clever about merge conflict resolution. Git’s philosophy is to be smart about determining when a merge resolution is unambiguous, but if there is a conflict, it does not try to be clever about automatically resolving it. Therefore, if you wait too long to merge two branches that diverge quickly, you can run into some issues.

Scott Chacon and Ben Straub - Pro GIT – Everything you need to know about GIT. Apress, 2018 -Page 267.

Based on the text, it is correct to say about Merging in GIT that:

  1. The merging process in GIT is usually difficult.
  2. Although GIT does not facilitate fusion, it is a very easy process to apply.
  3. According to the GIT theory, if conflicts occur during the merge process, one may not attempt to resolve it automatically.
  4. To make the merging, the ideal thing to do is to wait to perform the merge of two branches, in order to avoid problems.
  5. Unlike other merge processes, the GIT one tries to be overly intelligent about conflict resolution.
Mostrar resposta e comentário

Gabarito

Certo

Comentário do professor

A alternativa indica que, segundo a teoria do GIT, quando surgem conflitos na fusão, o sistema não tenta resolver automaticamente. Isso significa que o Git só aplica correções automáticas quando a mesclagem é inequívoca; se houver dúvida sobre a intenção das alterações, ele interrompe o processo e exige intervenção humana.

Na prática, ao encontrar um conflito o Git marca os trechos conflitantes com <<<<<<< HEAD e e cria um estado de índice onde o desenvolvedor deve escolher ou editar o conteúdo correto, finalizando a operação com um commit de merge.

Essa abordagem evita decisões automatizadas que possam introduzir erros sem contexto. Portanto, a responsabilidade pela resolução manual cabe ao responsável pelo código, que pode usar editores, ferramentas gráficas ou mergetool para acertar o resultado final.

Conteúdo do catálogo FC Concursos · Atualizado em

Continue aprendendo