Assuming you have already commit your changes then I would use rebase (unless you're still working on your changes, then you might want to keep them in your local copy).
Rebase will compare two branches and will pop off the changes of your current branch (e.g. your local changes), pull the other branch (e.g. the remote), and replay your changes on top one-by-one
Rebase works when you've already commit your changes. For example,
master: A - B - C
origin/master: A - B - D
Rebasing master on origin/master turns this into
master: A - B - D -C
There is a convenience option for this with git pull
git pull --rebase
I tend to also like to use interactive rebase a lot which gives you more flexibility allowing you to rename commits, reorder them, squash them into other commits, etc.
git rebase -i origin/master
One caveat with rebase is that it will recreate all of the commits it rebases. This means they will all get new SHA's and that Git won't recognize them as the same commits
EDIT:
If you don't want to rebase then you should be able to use reset.
git reset <commit>
In the below I add a "bad commit" and want to rollback my log while keeping the changes from bad commit in my working copy. I use the HEAD~1 alias, but you could also give it a SHA.
Bodah@jbodah-local 2.1.3p242 ~/repos/spy_rb (master) $ git log origin/master -1
commit 8fd6a1a7704d2c0dc1323c4d8e5e169c169c833c
Author: Josh Bodah <jb3689@yahoo.com>
Date: Thu Dec 18 17:55:14 2014 -0500
generate tags in change_version
Bodah@jbodah-local 2.1.3p242 ~/repos/spy_rb (master) $ git log -2
commit b925445207000905d535e715a06d312ca65be5c1
Author: Josh Bodah <jb3689@yahoo.com>
Date: Tue Dec 30 09:31:36 2014 -0500
bad commit
commit 8fd6a1a7704d2c0dc1323c4d8e5e169c169c833c
Author: Josh Bodah <jb3689@yahoo.com>
Date: Thu Dec 18 17:55:14 2014 -0500
generate tags in change_version
Bodah@jbodah-local 2.1.3p242 ~/repos/spy_rb (master) $ git log origin/master -1
commit 8fd6a1a7704d2c0dc1323c4d8e5e169c169c833c
Author: Josh Bodah <jb3689@yahoo.com>
Date: Thu Dec 18 17:55:14 2014 -0500
generate tags in change_version
Bodah@jbodah-local 2.1.3p242 ~/repos/spy_rb (master) $ git reset HEAD~1
Unstaged changes after reset:
M README.md
Bodah@jbodah-local 2.1.3p242 ~/repos/spy_rb (master) $ git log -1
commit 8fd6a1a7704d2c0dc1323c4d8e5e169c169c833c
Author: Josh Bodah <jb3689@yahoo.com>
Date: Thu Dec 18 17:55:14 2014 -0500
generate tags in change_version
Bodah@jbodah-local 2.1.3p242 ~/repos/spy_rb (master) $ git status
On branch master
Your branch is up-to-date with 'origin/master'.
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
modified: README.md
no changes added to commit (use "git add" and/or "git commit -a")