Sometimes when you merge two git branches, it might give you conflict. Conflict occurs because the same line in the same file has been edited differently in the two branches. This confuses git as to which change to accept and merge. Git conflicts are to be always resolved manually before git can proceed with the merge.
For example, I have two different branches here named current-branch and dev-branch. I want to merge the changes in dev-branch to current-branch now but I am getting a conflict.
[root@abc]# git branch
[root@abc]# git merge new-branch
CONFLICT (content): Merge conflict in abc.txt
Automatic merge failed; fix conflicts and then commit the result.
Now, to resolve the conflict, you the git mergetool
If you have not already conf...Read More