When I do a git status I get a list of files prefixed with new file: . How can I get only this list? I want to process this files in a simple loop
Instead of parsing the output of "git status", it is probably more elegant to use
git ls-files -o --exclude-standard
As with git status, ls-files will produce output relative to your currrent working directory.
You may wish to include the --full-name option:
git ls-files -o --exclude-standard --full-name