When I want to split up a new file into several commits I can git add -N <file>
and then interactively stage lines using git gui
. When I make a mistake while staging, however, git gui
won't let me unstage individual lines because it is a new file (which seems like a bug to me). Of course I can always unstage the whole file and start over again, but I am wondering whether there is a more efficient way to do so.
I am using git 1.7.5
.
To clarify, this question is specific to new aka untracked files!