git ls-files --others
goes down the directory tree. Is there an easy way to show untracked files only in the current directory?
Use the exclude pattern of ls-files:
# on Windows, with msysgit
git ls-files --others -x */*
# on Unix (Cygwin or Ubuntu), quotes are necessary around the pattern
git ls-files --others -x "*/*"
From the man page:
-x
--exclude=
Skip untracked files matching pattern. Note that pattern is a shell wildcard pattern.