Wednesday 17 September 2014

Github: Steps to solve merge conflict from terminal

Syncing a fork

 When you synchronize your fork with upstream(i.e original developer branch)
 sometime you got merge conflict.  
git fetch upstream
git checkout master
git merge upstream/master 
 
If you got merge conflict. Follow the next steps to solve merge conflict 
and keep your fork updated.
 
 1) grep -lr '<<<<<<<' .\
 2) git checkout --ours Path/File
               OR

    git checkout --theirs Path/File
 3) git commit -am "fix conflict"
 4) git pull --repo= <URL>

No comments:

Post a Comment