Useful shortcuts for vi editor

Monday, 30 September 2019

How to solve git merge conflict?

e.g. git merge conflict issue
source: private branch
target: develop branch

1st step:
$ git clone http://blabla --branch private

2nd step:
$ cd <working folder>

3rd step:
$ git checkout private
-> if not specified branch by default while cloning branch

4th step:
$ git merge develop

Error occurred in here
Auto-merging my_new_file.yml
CONFLICT (content): Merge conflict in my_new_file.yml
Auto-merging my_new_file.yml
Automatic merge failed; fix conflicts and then commit the result.

5th step:
-> make necessary changes on my_new_file.yml

6th step:
$ git status
-> check the file

7th step:
$ git branch
-> check the branch before commit

8th step:
$ git add --all

9th step:
$ git commit -m "blabla"

10th step:
$ git push