[An] alternative would be to make a script which greps the filenames after
git status‘ untracked files, and sends the output to
.gitignore, which might be what I will end up doing.
For writing scripts, always try to use plumbing commands.
git status there is the
--porcelain option1 to turn it into a plumbing command. Consider also using
git ls-files --others (
-o for short) but note that you would want to add the
Related, but not my main question: Is there a reason why git doesn’t include a
Define what, precisely, it would do; write one; and submit it and see if you can get it accepted. 🙂
1As always, I express my own bafflement as to why this option is not spelled
CLICK HERE to find out more related problems solutions.