I made some commits to my master git branch and put some buggy code on, which I want to get rid of.
Commit 1
Commit 2
Commit 3
I want to keep commit 2, and get rid of the changes made in commit 1 and 3. Commit 2 and Commits 1,3 have no intersection. Additionally it's worth pointing out that all the changes from commit 1 and 3 are confined to a few files in a specific directory, which commit 2 did not touch either.
How do I do this with git?