0

Git is refusing to update for the server. It keeps complaining:

Pull is not possible because you have unmerged files. Please, fix them up in the work tree, and then use 'git add/rm ' ...

I have deleted the local files that are supposed to be causing the problems. I have performed a git reset --hard HEAD. I also performed the git fetch origin from this question with the reset. The files no long exist, but the git pull continues to fails.

This solution is kind of ridiculous (no offense to the poster). All I want Git to do is get the remote files. I can't imagine 20 or 30 steps are required just to sync with a remote server.

How do I force this stupid program to take the files form the remote server?

Or is deleting the directory and performing a fresh checkout the easiest solution?

Community
  • 1
  • 1
jww
  • 97,681
  • 90
  • 411
  • 885
  • Are you on a Windows or Mac machine, and is the change due to a file that has had its name changed? – Makoto Dec 29 '15 at 00:54

2 Answers2

2

You could also try these:

git merge --abort
git rebase --abort

The text because you have unmerged files suggests to me that you have a pending merge or rebase operation underway that is blocking you from performing other operations. If you use git bash, you might see MERGING or something else like that in your prompt.

Drew Noakes
  • 300,895
  • 165
  • 679
  • 742
-1

If you are willing to lose your changes (as it looks like you are since you deleted files and reset the head of the branch), have you tried this (assuming matter is your branch)?

git reset --hard origin/master

This will reset the head of your branch to the remote branch head rather than the local head (which is likely ahead of the remote by one or more commits).

MattTannahill
  • 606
  • 4
  • 11
  • Please post clarifying questions as comments to the original query, not as answers. – Turn Dec 29 '15 at 01:05