The 'git status' command needs the '--short' or '--porcelain' flags for the
untracked files to start with a '?' character.
From the 'man git-status' output,'--porcelain' is identical to '--short' but is
guaranteed not to change in the future, making it safe for scripts.
Below is an example of 'git status' without and with the --porcelain flag:
jude@pwan:~/projects/rancid (master % u=)$ git status
On branch master
Your branch is up to date with 'origin/master'.
Untracked files:
(use "git add <file>..." to include in what will be committed)
blah
nothing added to commit but untracked files present (use "git add" to track)
jude@pwan:~/projects/rancid (master % u=)$ git status --porcelain
?? blah
The 'git status' command needs the '--short' or '--porcelain' flags for the untracked files to start with a '?' character.
From the 'man git-status' output,'--porcelain' is identical to '--short' but is guaranteed not to change in the future, making it safe for scripts.
Below is an example of 'git status' without and with the --porcelain flag: