When I want to split up a new file into several commits I can git add -N
and then interactively stage lines using git gui
. When I make a m
From the command line type:
git reset -p
This will let you selectivelty unstage hunks from the index using the standard command-line interface for managing hunks.. This is the opposite of git add -p
.
UPDATE
OK, it would appear that you cannot selectively stage different hunks when the file is new. Given that git-gui and the standard git hunk editor both do not allow this, it probably isn't possible.