. Advertisement .
..3..
. Advertisement .
..4..
I get the “error: pulling is not possible because you have unmerged files.” issue when trying to pull in my project directory in the terminal. Here is the detail of the error I got the error message:
harsukh@harsukh-desktop:~/Sites/branch1$ git pull origin master
U app/config/app.php
U app/config/database.php
U app/routes.php
Pull is not possible because you have unmerged files.
Please, fix them up in the work tree, and then use 'git add/rm <file>'
as appropriate to mark resolution, or use 'git commit -a'.
Please give me some advice to solve this problem.
The cause: You are having a certain set of files, but they create merge conflicts. Your files are not merged all right because your merge conflicts probably from the last commit were not resolved, so the U flag unmerged for the files. This leads to when you do a git pull, git will show the error because you are having some versions of the file not correctly resolved.
Solution: To resolve this error, first you have to resolve the merge conflicts appeared in your question. Before you can do a
git pull
, you also have to add and commit the changes.You can still update your local if you don’t want to merge the changes.
This will reset your local by using HEAD, and then you can pull your remote with git pull.
If you have already committed your merge locally, but have not pushed to remote yet, and wish to revert it: