I recently made a commit in a project that, mistakenly, included changes to `db/schema.rb`. My local schema was out of date and this could cause trouble for the others in my team.
Luckily we use [a successful git branching model][1] so my changes were still up for review by the team.
The change I made was part of larger commit. But all I wanted was to revert serveral chunks from `db/schema.rb` that would cause trouble.
## Interactive add
Now, there's `git add -i` which allows you to selectively stage chunks for the next commit. Unfortunately, the process for reversing interactively is a bit more complicated, but not much.
## Interactive revert
Well, let's say you want to revert changes you made in commit `f1e11c`. Go to your feature branch and revert your changes for that commit <em>but do not commit them yet</em>, hence the `-n` option: