Happens when working on a team project when two/more developers have edited the same file.
Therefore, face the conflict courageously.
Assumption: current_branch
(local branch) conflicts with a base branch called base-branch
git pull origin --rebase base-branch
. If your local base-branch is upto date with origin, you can just dogit rebase base-branch
If merge conflicts persist:- Fix merge conflicts by accepting either
current changes
,incoming changes
orAccept both changes
. Remember to cosult when fixing conflicts because you might end up removing crucial code.