This worked for me perfectly:
1.git stash
to discard your local modifications
2.git checkout master
to switch to the main branch (Assuming you want to use master)
3.git pull
to pull last commit from master branch
4.git status
in order to check everything looks great
On branch master
Your branch is up-to-date with 'origin/master'.