I love git add --interactive. It is now part of my daily workflow.
The problem seems that it does not work with untracked files. What I wan
Whoa, all that update-index
and hash-object
business seems overly complicated. How about this instead:
git add -N new_file
git add -i
From git help add
:
-N, --intent-to-add
Record only the fact that the path will be added later. An entry
for the path is placed in the index with no content. This is useful
for, among other things, showing the unstaged content of such files
with git diff and committing them with git commit -a.