{"thread":{"id":"22895","subject":"Git diff does not detect newly added files to working tree","startedAt":"2010-03-03T20:03:48Z","lastAt":"2010-03-03T20:12:22Z","messageCount":2,"participants":["jateeq","Matthieu Moy"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"136091","messageId":"27772711.post@talk.nabble.com","threadId":"22895","inReplyTo":null,"subject":"Git diff does not detect newly added files to working tree","fromName":"jateeq","fromEmail":"jawad_atiq@hotmail.com","sentAt":"2010-03-03T20:03:48Z","receivedAt":"2010-03-03T20:03:48Z","isPatch":false,"sender":{"key":"jawad_atiq@hotmail.com","avatar":null},"body":"\n\nHello,\n\nIf I add a new file to a working tree, and run the following command without\nhaving staged or committed the file, according to the manual I should be\nable to get the name of the file - but it just doesn't show up. Anyone knows\nwhat I'm doing wrong? Note that the added file is not empty.\n\nCommand: git diff --name-only --diff-filter=[ACDM*] \nThe manual is  http://www.kernel.org/pub/software/scm/git/docs/git-diff.html\nhere .\n\nFanks, \nJawad\n-- \nView this message in context: http://old.nabble.com/Git-diff-does-not-detect-newly-added-files-to-working-tree-tp27772711p27772711.html\nSent from the git mailing list archive at Nabble.com.\n"},{"id":"136095","messageId":"vpqlje9kvvd.fsf@bauges.imag.fr","threadId":"22895","inReplyTo":"27772711.post@talk.nabble.com","subject":"Re: Git diff does not detect newly added files to working tree","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@grenoble-inp.fr","sentAt":"2010-03-03T20:12:22Z","receivedAt":"2010-03-03T20:12:22Z","isPatch":false,"sender":{"key":"matthieu.moy@grenoble-inp.fr","avatar":"https://gravatar.com/avatar/72c8a2705971a25dfaff23cece15130d405685845d911aedd5667ace277f3fc5?d=mp&s=160"},"body":"jateeq <jawad_atiq@hotmail.com> writes:\n\n> Hello,\n>\n> If I add a new file to a working tree, and run the following command without\n> having staged or committed the file, according to the manual I should be\n> able to get the name of the file\n\nWhich part of the manual makes you think you should see untracked\nfiles? (that's a real question ;-) ).\n\n> - but it just doesn't show up. Anyone knows what I'm doing wrong?\n\ngit diff doesn't mention untracked files, but shows the diff between\nthe working tree and the staged content for files known to git.\n\nTo see the files in \"git diff\", you have to let Git know about these\nfiles, with \"git add --intent-to-add the-file-you-want-to-see\" (alias\n\"git add -N\"), or you should use \"git status\".\n\n-- \nMatthieu Moy\nhttp://www-verimag.imag.fr/~moy/\n"}]}