This command will help to pull from the repository as the different user:
git pull https://myusername@github.com/projectfolder/projectname.git master
It is a workaround, when you are using same machine that someone else used before you, and had saved credentials