문제

I have 2 edits very close by (and therefore part of the same hunk), that I'd like to commit separately. Is it possible to split a hunk from within magit?

도움이 되었습니까?

해결책

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.

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top