It depends, if it's about removing a commit, that's "easy" with

git rebase -i $commit_hash_up_to_which_to_rebase

this will present a list of commits that were done since $commit_hash_up_to_which_to_rebase. By changing the presented text file and deleting a given commit, history will be rewritten as if the commit had never existed. The given changes will also be undone of course.

The cleanest solution I can think of is the following:

git checkout etmc/master -- benchmark.c
git add benchmark.c
git commit --amend

This will amend the HEAD commit to include new the changes to benchmark.c without adding another commit. Of course, this won't remove the previous changes from the history and benchmark.c will be marked as having been changed twice in this changeset. (so git log benchmark.c will show both of these commits)

More fine-grained control can be done by an interactive step by-step rebase, but that's a lot of hassle (but it works very well, I've used it a few times for just that). 

(see documentation for git rebase interactive, in the list you can choose commits that you'd like to edit which will drop you back to shell, able to edit, add commit and then issue git rebase continue) git-scm.com/book/en/Git-Tools-Rewriting-History