git: How to ignore all present untracked files?
问题 Is there a handy way to ignore all untracked files and folders in a git repository? (I know about the .gitignore .) So git status would provide a clean result again. 回答1: As already been said, to exclude from status just use: git status -uno # must be "-uno" , not "-u no" If you instead want to permanently ignore currently untracked files you can, from the root of your project, launch: git status --porcelain | grep '^??' | cut -c4- >> .gitignore Every subsequent call to git status will