From: "Rafael Ascensão" <rafa.almas@gmail.com>
To: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Cc: Jeff King <peff@peff.net>,
jason@lakedaemon.net, Junio C Hamano <gitster@pobox.com>,
lhf635@163.com, Git Mailing List <git@vger.kernel.org>
Subject: Re: the opposite of .gitignore, whitelist
Date: Fri, 26 Oct 2018 14:28:25 +0100 [thread overview]
Message-ID: <CACUQV5-t5NHwQMC0=TYZVmPT1NSQn_J+Nz+vj4jj9-b=pn9oTw@mail.gmail.com> (raw)
In-Reply-To: <87tvl8lw5d.fsf@evledraar.gmail.com>
One other option is to just use a pattern that matches everything, i.e:
echo '*' > .gitignore
And take advantage that ignore rules do not apply to tracked files.
So instead of using an explicit .gitonly, you add files using:
git add -f <file_to_be_included>
All files should be ignored except the ones that were forcibly added.
If needed, git ls-files can be used to list either category.
Cheers,
Rafael Ascensão
next prev parent reply other threads:[~2018-10-26 13:29 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-25 2:39 the opposite of .gitignore, whitelist lhf635
2018-10-25 5:37 ` Junio C Hamano
2018-10-25 14:38 ` Jason Cooper
2018-10-26 9:36 ` Jeff King
2018-10-26 11:31 ` Mischa POSLAWSKY
2018-10-26 11:53 ` Jeff King
2018-10-26 12:39 ` Ævar Arnfjörð Bjarmason
2018-10-26 13:28 ` Rafael Ascensão [this message]
2018-10-26 13:34 ` Jason Cooper
2018-10-26 15:27 ` Jason Cooper
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CACUQV5-t5NHwQMC0=TYZVmPT1NSQn_J+Nz+vj4jj9-b=pn9oTw@mail.gmail.com' \
--to=rafa.almas@gmail.com \
--cc=avarab@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=jason@lakedaemon.net \
--cc=lhf635@163.com \
--cc=peff@peff.net \
/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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).