All of lore.kernel.org
 help / color / mirror / Atom feed
* Git diff does not detect newly added files to working tree
@ 2010-03-03 20:03 jateeq
  2010-03-03 20:12 ` Matthieu Moy
  0 siblings, 1 reply; 2+ messages in thread
From: jateeq @ 2010-03-03 20:03 UTC (permalink / raw)
  To: git



Hello,

If I add a new file to a working tree, and run the following command without
having staged or committed the file, according to the manual I should be
able to get the name of the file - but it just doesn't show up. Anyone knows
what I'm doing wrong? Note that the added file is not empty.

Command: git diff --name-only --diff-filter=[ACDM*] 
The manual is  http://www.kernel.org/pub/software/scm/git/docs/git-diff.html
here .

Fanks, 
Jawad
-- 
View this message in context: http://old.nabble.com/Git-diff-does-not-detect-newly-added-files-to-working-tree-tp27772711p27772711.html
Sent from the git mailing list archive at Nabble.com.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Git diff does not detect newly added files to working tree
  2010-03-03 20:03 Git diff does not detect newly added files to working tree jateeq
@ 2010-03-03 20:12 ` Matthieu Moy
  0 siblings, 0 replies; 2+ messages in thread
From: Matthieu Moy @ 2010-03-03 20:12 UTC (permalink / raw)
  To: jateeq; +Cc: git

jateeq <jawad_atiq@hotmail.com> writes:

> Hello,
>
> If I add a new file to a working tree, and run the following command without
> having staged or committed the file, according to the manual I should be
> able to get the name of the file

Which part of the manual makes you think you should see untracked
files? (that's a real question ;-) ).

> - but it just doesn't show up. Anyone knows what I'm doing wrong?

git diff doesn't mention untracked files, but shows the diff between
the working tree and the staged content for files known to git.

To see the files in "git diff", you have to let Git know about these
files, with "git add --intent-to-add the-file-you-want-to-see" (alias
"git add -N"), or you should use "git status".

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-03-03 20:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-03 20:03 Git diff does not detect newly added files to working tree jateeq
2010-03-03 20:12 ` Matthieu Moy

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.