Git pull - Please move or remove them before you can merge

I am trying to do a git pull origin master from my server but keep getting the error:

Please move or remove them before you can merge.

There are no untracked files, but it seems like it has issues with the ignored files for some reason.

I tried running a git clean -nd to see what would be deleted and it lists a whole bunch of files that are ignored in .gitignore.

How can I fix this so I can do a pull?


I just faced the same issue and solved it using the following.First clear tracked files by using :

git clean -d -f

then try git pull origin master

You can view other git clean options by typing git clean -help


To remove & delete all changes git clean -d -f