error saying unmerged paths

0 votes
I'm trying to execute the git pull command and i'm getting an error saying unmerged paths. How do I clear it?
Jun 27, 2018 in Git & GitHub by Hannah
• 18,570 points
1,777 views

1 answer to this question.

0 votes

Git merging means taking changes from one context and combining it with your current working files. Most of the times git figures how to merge but there are few cases when you need to tell git what you do.

For example, when two people make changes to the same line in same file, when one person decides to delete while another person decides to manipulate the file etc.

try $git mergetool

It opens a GUI that helps you through every single step in resolving merge conflict.

The command does not open a GUI unless you've installed one.

 set vimdiff as your default merge too using the following commands

$git config merge.tool vimdiff

$git config merge.conflictstyle diff3

$git config mergetool.prompt false

run the following command

 $git mergetool

You'll see a vimdiff display

LOCAL BASE REMOTE
MERGED

You can navigate between different views using ctrl+w and reach the MERGED view using ctrl+w-j

You could edit the MERGED view the following wa

 -If you want to get changes from REMOTE

  :diffg RE 

 -If you want to get changes from BASE

  :diffg BA 

 -If you want to get changes from LOCAL

 :diffg LO

Save, Exit, Commit and Clean up

 :wqa save and exit from vi

git commit -m "message"

git clean Remove extra files created by diff tool.

answered Jun 27, 2018 by anonymous

Related Questions In Git & GitHub

0 votes
1 answer

How do I solve a Git checkout error: updating paths is incompatible with switching branches?

This error occurs when you are checking ...READ MORE

answered Jul 26, 2018 in Git & GitHub by Sophie may
• 10,610 points
9,573 views
0 votes
1 answer

How to solve the ‘Git commit -a error’?

This happens when no editor is set. ...READ MORE

answered Jul 5, 2018 in Git & GitHub by Tyrion anex
• 8,700 points
2,041 views
+2 votes
3 answers

Cloning the Git Repository on Eclipse (Transport Error)

File/Import... Select dialog * Git/Projects from Git * click next Select ...READ MORE

answered Jul 23, 2018 in Git & GitHub by Kalgi
• 52,360 points
23,188 views
0 votes
1 answer

Error: git pull fails “unable to resolve reference” “unable to update local ref”

This happens when there are unnecessary files ...READ MORE

answered Jul 26, 2018 in Git & GitHub by Sophie may
• 10,610 points
18,247 views
+2 votes
5 answers

ERROR: 'git' is not recognized as an internal or external command.

You have to set your PATH to ...READ MORE

answered Aug 2, 2018 in Git & GitHub by Sophie may
• 10,610 points
46,694 views
+2 votes
5 answers

error cloning remote repo 'origin'

ERROR: Error cloning remote repo 'origin' hudson.plugins.git.GitException: Could ...READ MORE

answered Jun 3, 2019 in Git & GitHub by Sirajul
• 59,230 points
38,503 views
+15 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
3,507 views
+2 votes
1 answer
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP