On Feb 14, 4:14 pm, Thomas Ferris Nicolaisen <tfn...@gmail.com> wrote:
> *Solution 1:*
> I could do a git revert, then do a reset, commit foo.txt only, and drop the
> changes in the other files.
> *Solution 2:*
> git diff -R Z foo.txt > revert.diff
> git apply revert.diff
Try this as well:
git reset Z^ -- foo.txt
You should see that your index is updated as it was when you did
commit Z, except foo.txt. The changes that you did to foo.txt then is
now present in the working tree. If you want to completely revert
changes to foo.txt, I think all you need is to do a git commit at this
You received this message because you are subscribed to the Google Groups "Git
for human beings" group.
To post to this group, send email to email@example.com.
To unsubscribe from this group, send email to
For more options, visit this group at