public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Nick Douma <n.douma@nekoconeko•nl>
To: Yves Perron <yves.perron@modusfx•com>
Cc: git@vger•kernel.org
Subject: Re: Don't share anything but those files
Date: Tue, 17 Jul 2012 10:37:28 +0200	[thread overview]
Message-ID: <50052448.5060407@nekoconeko.nl> (raw)
In-Reply-To: <5000334C.5030505@modusfx.com>

[-- Attachment #1: Type: text/plain, Size: 653 bytes --]

Hoi,

On 13-07-12 16:40, Yves Perron wrote:
> I'm wondering how to commit only selected files/folders on GIT, if even
> possible. Note, the ignore list is not a good option for me as I'd like
> to add a few files in a folder that contains many hundreds for instance.
> 
> Basically, I'm looking for a way to say, don't share anything but those
> files.

I would use a .gitignore with something like:

cat <<EOF > .gitignore
# Ignore everything
*
# Except
!/.gitignore
!/path/to/file/1
!/path/to/file/2
EOF

Only the two specified files and the .gitignore file should be shown in
`git status` now.

Kind regards,

Nick Douma


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 262 bytes --]

  reply	other threads:[~2012-07-17  8:37 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-13 14:40 Don't share anything but those files Yves Perron
2012-07-17  8:37 ` Nick Douma [this message]
  -- strict thread matches above, loose matches on Subject: below --
2012-07-13 14:59 Yves Perron
2012-07-13 15:21 ` Edward Toroshchin
     [not found]   ` <50004048.9060203@modusfx.com>
2012-07-13 16:14     ` Edward Toroshchin
2012-07-13 17:40       ` Yves Perron
2012-07-13 17:53         ` Taylor Hedberg
2012-07-13 18:08   ` Illia Bobyr
2012-07-13 18:19     ` Yves Perron
2012-07-16 14:26       ` Yves Perron

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=50052448.5060407@nekoconeko.nl \
    --to=n.douma@nekoconeko$(echo .)nl \
    --cc=git@vger$(echo .)kernel.org \
    --cc=yves.perron@modusfx$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox