You can move the commits to a branch and reset your master branch to where it was with:
git branch new-feature
git reset --hard origin/master
Note that this will blow away any uncommitted changes, if that is a problem you should use git stash
before starting to save them away.