When I run git add -p, is there a way for git to select newly made files as hunks to select??
So if I make a new file called foo.java, then run
To do this with every new files, you can run:
git add -N . # Add every untracked file in $PWD without their content.
git add -p # Interactively add content.
If you want to use it frequently, you can create an alias in your ~/.bashrc:
alias gapan='git add --intent-to-add . && git add --patch'
N.B: If you use this with an empty new file, git will not be able to patch it and skip to the next one.