How to edit Git “add patch” hunks/diffs/lines during selective staging?

后端 未结 5 1736
不知归路
不知归路 2020-12-28 14:33

I have a source file where 2 features have been added. In order to allow cherry-picking, I\'d like to commit that in 2 phases: one for each feature. Until now, in similar si

5条回答
  •  失恋的感觉
    2020-12-28 15:21

    You can edit the patch by pressing e during a git add -p. It will not affect the original file.

提交回复
热议问题