I have a modified and not staged file myfile.txt.
I want to git restore (or git checkout) myfile.txt, but it must undo the modifications done only within the line range 15-17. How to do that?
I've some solution by using interactive -p option, but I am not interested in this approach as I already know the line range I want to undo modifications.
There is no built-in mode of
git restorethat would allow you to undo a change partially in a non-interactive way.