If I have a bunch of uncommitted changes to a single file in my working directory in Git, what's the easiest way to selectively pick and choose among these changes?
My current way is to "git diff" the file, and then manually review the diff alongside the actual file. If I want to restore bits of old code, I can copy and paste from the diff to the file.
It would be a lot easier in some cases if one could instead view and edit the changes in a single file. For example, is there a Git command one could use to convert the working file with changes to a conflict-resolution-like format -- i.e. with "<<<<" symbols around the uncommitted changes? This way one could pick and choose changes without having to cut and paste from one file to another.
I'm not sure how to accomplish this since it's not a three-way (merge) situation. Rather, it's a two-way situation, with one set of changes to one file (so there are no conflicts). Thanks.