Merge them
Create a new change in master
Only to simulate a conflict!
git checkout master
echo "content modified in master" > code.txt
git commit -am "content modified in master"
Merge the branch on master
git merge feature
Results in conflict
Auto-merging code.txt
CONFLICT (content): Merge conflict in code.txt
Automatic merge failed; fix conflicts and then commit the result.
cat code.txt
<<<<<<< HEAD
content modified in master
=======
some content from feature
>>>>>>> feature
Resolve manually
Resolve manually using some file editor (What you keep in the final modification is upto you and the other developer as per situation)
Commit again
After final modification, commit again
git commit -am "merged feature"
git log --oneline
Merging is now complete!
Last updated