I just deleted ALL the code from a file in my project and committed the change to my local git (on purpose). I did
git pull upstream mas
While none of these answers worked for me, I was able to fix the issue using the following command.
git fetch origin
This did a trick for me.