What is a “conflict” in GIT and how is it resolved?

devquora
devquora

Posted On: Feb 22, 2018

 

When a commit that has to be merged has some changes in one place, which also has the changes of current commit, then the conflict arises. The GIT will not be able to predict which change will take the precedence.
In order to resolve the conflict in GIT: we have to edit the files to fix the conflicting changes and then add the resolved files by running the “GIT add” command; later on, to commit the repaired merge run the “GIT commit” command. GIT identifies the position and sets the parents of the commit correctly.

    Related Questions

    Please Login or Register to leave a response.

    Related Questions

    Git Interview Questions

    What is GIT and why do we use it?

    GIT is a Distributed Version Control System (DVCS) and Source Code Management System (SCMS) which can track changes to a..

    Git Interview Questions

    What are GIT stash and GIT stash drop?

    GIT stash:It takes the current state of working directory and index and pushes into the stack for later and returns to ..

    Git Interview Questions

    Name some GIT commands and also explain their functions?

    GIT diff – It shows the changes between commits, commits and working tree.GIT status – It shows the difference b..