Re: How to add folder NON RECURSIVELY ?
- From
Matthieu Moy <matthieu.moy@grenoble-inp.fr>
- Date
- Apr 3, 2012, 13:15 UTC
- Message-ID
- <vpqaa2tc5xi.fsf@bauges.imag.fr>
- In-Reply-To
- <201204031223.q33CMvQC004186@VM-MailSafe-02.soltecsis.com>
"J. Bakshi" <joydeep.bakshi@infoservices.in> writes:
Show 6 quoted lines
> Could you please suggest how can I add foo/dir1/file1 ? > > guess > > touch foo/dir1/.gitignore > git add foo/dir1/
Not if you want only "file1" to be added. As I said, Git doesn't know and doesn't want to know about directories. So "git add directory/" is just a shorthand that adds all (non-ignored) files in this directory.
> git add foo/dir1/file1
This last line alone will do it.
-- Matthieu Moy http://www-verimag.imag.fr/~moy/