Re: Git diff does not detect newly added files to working tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



jateeq <jawad_atiq@xxxxxxxxxxx> 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/
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]