06 June 2021

How to find what the git merge conflicts are?

 How to find what the git merge conflicts are?

After you run
$git merge <branch name 2>

If the merge failed, and it said that there was a conflict, the error message would tell you in which file the conflict was - 'Merge conflict in <file name>'.

Run -
$git diff <current branch name> <branch name 2> <file name>

you will get what the conflict is. Content in red is the change done in <current branch name>, and that in green is the change done in <branch name 2>.



No comments:

Post a Comment