Check out example codes for "git Automatic merge failed; fix conflicts and then commit the result". It will help you in understanding the concepts better.

Code Example 1

$ git status

$ git add .

$ git commit -a "Comment"

Code Example 2

$ git statusOn branch masterYou have unmerged paths.(fix conflicts and run "git commit")(use "git merge --abort" to abort the merge)Unmerged paths:(use "git add <file>..." to mark resolution)both modified:   merge.txt

Learn ReactJs, React Native from akashmittal.com