I just cloned a git repository and checked out a branch. I worked on it, and then decided to remove all my local changes, as I wanted the original copy.
In short, I
The best way is checking out the changes.
Changing the file pom.xml in a project named project-name you can do it:
git status
# modified: project-name/pom.xml
git checkout project-name/pom.xml
git checkout master
# Checking out files: 100% (491/491), done.
# Branch master set up to track remote branch master from origin.
# Switched to a new branch 'master'