Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

resolve merge conflicts git

Merge conflicts usually occur when multiple developers work on the same code 
of a project or when they work with several development branches. 
Git merge warns the user about these conflicts.

Although most merge conflicts resolve automatically, there are cases when 
git merge cannot resolve an issue.

# Accept the local version. 
git checkout --ours <file name>
# Alternatively, to accept the local version for all conflicting files, use:
git merge --strategy-option ours

#  Accept the remote version
git checkout --theirs <file name>
# Accept the remote version for all conflicting files with:
git merge --strategy-option theirs
Source by phoenixnap.com #
 
PREVIOUS NEXT
Tagged: #resolve #merge #conflicts #git
ADD COMMENT
Topic
Name
7+3 =