Since the last commit, I've changed several files. But I want to discard all of these changes and go back to that commit.
git reset --hard
In the Rtesseract source,
git log -L306:310:src/ext.cpp
git show --pretty="" --name-only c9a372
git diff --stat --cached origin/master
git rev-list HEAD -- tmp
Use git cherry-pick. This is for commits, while git merge is for merging all commits from an entire branch. See CherryPick.