All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>
To: "J. Bakshi" <joydeep.bakshi@infoservices.in>
Cc: git@vger.kernel.org
Subject: Re: How to add folder NON RECURSIVELY ?
Date: Tue, 03 Apr 2012 15:15:37 +0200	[thread overview]
Message-ID: <vpqaa2tc5xi.fsf@bauges.imag.fr> (raw)
In-Reply-To: <201204031223.q33CMvQC004186@VM-MailSafe-02.soltecsis.com> (J. Bakshi's message of "Tue, 3 Apr 2012 17:52:47 +0530")

"J. Bakshi" <joydeep.bakshi@infoservices.in> writes:

> 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/

  parent reply	other threads:[~2012-04-03 13:15 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-03 12:01 How to add folder NON RECURSIVELY ? J. Bakshi
2012-04-03 12:08 ` Matthieu Moy
2012-04-03 12:22   ` J. Bakshi
2012-04-03 13:12     ` Dirk Süsserott
2012-04-03 13:15     ` Matthieu Moy [this message]
2012-04-04  6:52       ` J. Bakshi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=vpqaa2tc5xi.fsf@bauges.imag.fr \
    --to=matthieu.moy@grenoble-inp.fr \
    --cc=git@vger.kernel.org \
    --cc=joydeep.bakshi@infoservices.in \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.