These four commands work for me.
git reset --hard HEAD
git checkout origin/master
git branch -D master
git checkout -b master
To check/pull after executing these commands
git pull origin master
I tried a lot but finally got success with these commands.