When I am trying to pull from git,getting below error
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'.
I have tried to stash changes but after stash pull is not working, asking for merge.
How can I pull changes without commiting/adding existing?
To fix the “pulling is not possible” error, you can use git reset –hard. Always write a commit message after adding a file to Git's history. Ensure your files are updated to avoid conflict when pulling changes. You need to commit your changes or stash them before you can merge.
So now, when you do a git pull , git is throwing up the error, because you have some version of the file, which is not correctly resolved. To resolve this, you will have to resolve the merge conflicts in question, and add and commit the changes, before you can do a git pull .
Git Pull is Not Possible, Unmerged Files.
First backup the conflicted files!
Then execute:
git fetch origin
git reset --hard origin/master (or your branch name)
This way you should get the full git repository code if you want restore conflict file or compare them.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With