I am trying to pull changes from remote branch but getting an error which doesn\'t make sense
when I do
git pull
I get back
<git reset --hard
.That should fix it.
I had the same problem but with the .idea / vcs.xml and workspace.xml files. I deleted the 2 files then used the command: - git pull "remote" "brench"
I had this same issue, and the fetch/rebase answer didn't work for me. Here's how I solved it:
I deleted the file that was causing the issue, checked it out, and then pulled successfully.
You should:
That would be:
git checkout master
git fetch
git rebase origin/master
A shorter version of the above set of commands would be the following single command:
git pull --rebase
Had the same issue. Solved it by re-cloning the repo. But now I think that the reason was the line endings in these files. I played with them before.
I suppose that line-ending difference doesn't mark files as changed, but may lead to this message. When you rm
the files and recheckout
them, line endings should set to "good state", and pull goes fine.