In my git repo which is tracking a svn repo I have made a number of edits to a single file.
Now I want to revert those changes(like svn revert), but only portions of the
I believe you can do it most simply with:
git checkout -p
From the manpage:
−p, −−patch Interactively select hunks in the difference between the
(or the index, if unspecified) and the working tree. The chosen hunks are then applied in reverse to the working tree (and if a was specified, the index).
This means that you can use git checkout −p to selectively discard
edits from your current working tree.