If I have modified several lines of a versioned file, is it possible to undo the changes of a line by command-line?
Just like I would do for an entire file with:
git checkout /path/to/file.extension
git checkout /path/to/file.extension --line 10
You can use
git checkout -p to see each hunk individually and decide whether to check them out or leave them as is (and that takes an optional path argument as well if you'd like to narrow it down further).