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
The command line options described in the answers here are handy when the file is on a server which I am accessing via a ssh terminal. However, when the file is on my local machine I prefer the following way:
Open the file in the netbeans editor (which comes with git support). Netbeans puts red/green/blue marks at line numbers to indicate where stuff was deleted/added/modified (respectively).
Right clicking any of these marks gives you an option to undo that change. In addition, you can right click on red and blue marks to find see the old version in a popup.