This alias will respect your ignore patterns (builtin, global and per-directory, as described by the help for git-ls-files --exclude-standard
). It will run at the top level of your tree.
[alias]
adduntracked=!git add $(git ls-files -o --exclude-standard)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…