You can set the mark correctly with Ctrl+Space (C-SPC) and magit will only commit the selected portion.
You can also use - and + to decrease or increase the extent of the hunks in the diff (and 0 resets), but dominikh's answer is the most important one to know about.
@@
(the hunk information line) rather than inside the hunk as I had been trying to.
Magit reuse diff-mode
but don't expose many of diff-mode
commands in its magit-revision-mode
as this does VC package.
For example you can call diff-split-hunk
which is usually C-c C-s
in diff-mode
.
Success story sharing
C-x C-x
to exchange point and mark if you had done it the other way around.C-SPC
). I had to pressC-SPC
a second time to activatetransient-mark-mode
.Shift + <arrows>
to select portion of a hunk and presss
to stage the selected part.