I\'m trying to figure out how to easily count the files in my uncommitted index.
I\'ve tried:
git status | grep \'#\' | wc -l
but there
Try git status -s:
git status -s | egrep "^M" | wc -l
M directly after start-of-line (^) indicates a staged file. ^ M, with a space, would be an unstaged but changed file.
M
^
^ M