git list only untracked files

git列出还未保存的文件
该命令在某些场景很有用,加入保存前对文件进行处理

1
2
3
4
git ls-files --others --exclude-standard

# If you need to pipe the output to xargs, it is wise to mind white spaces using git ls-files -z and xargs -0:
git ls-files -z -o --exclude-standard | xargs -0 git add
#

Comments

Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×