[How To] Resolve merge conflicts in Git

Fixing git merge conflicts

 
git fetch origin
 
git pull origin master
 
git checkout myBranchWithConflicts
 
git merge FETCH_HEAD
 
git checkout --ours /file/with/conflicts
 
// or if you want to keep the other version:
//git checkout --ours /file/with/conflicts
 
git commit -m "fixing conflict by using my version"
 
git push
Attached Files
There are no attachments for this article.
Comments
There are no comments for this article. Be the first to post a comment.
Name
Email
Security Code Security Code
Related Articles RSS Feed
[How To] Rename a local and remote branch in git
Viewed 1870 times since Mon, Mar 6, 2017
MENU