If you haven't added the modification to the index yet, you can do a checkout to revert changes.
Use
git status
to see if any files are added to commit.
Or use
git diff
If you see diffs, the modifications are not added to the index yet.
With
git diff --cached
you can also check if there are any files to be committed in the index.
So when the index is empty, there is no output with
git diff --cached
then use this:
git checkout master
git pull
When you have modifications in the index, you have to reset your repo this way:
git reset --hard
git pull
This will revert the modifications in the working tree and also reset the index.
You may also have a look at these resources:
git tutorial:
http://www-cs-students.stanford.edu/~blynn/gitmagic/git reference:
https://git-scm.com/docs