git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Git ignore help
@ 2015-03-20 10:36 mdconf
  2015-03-22  3:33 ` Eric Sunshine
  0 siblings, 1 reply; 9+ messages in thread
From: mdconf @ 2015-03-20 10:36 UTC (permalink / raw)
  To: git

Hello,
I am trying to setup my git ignore (resp. .git/info/exclude) so that I exclude
 all directories and files except the content of directories that I 
specifically include (incl. anything within them recursively).

I set the .git/info/exclude with the following content:

========
# Exclude everything
/*
# Except the below that we include
!/db/data/load/base/bootstraponly
!/db/data/load/base/safetoload
!/db/ddl
!/labels
!/reports/usrint
!/scripts
!/src/cmdsrc/usrint
========

However it does not do what I anticipated. It indeed excludes everything but 
the include part does not work - it only works for !/labels and !/scripts 
directories (i.e. the first level directories). All other are still ignored - 
so when I create file /db/data/load/base/bootstraponly/somefile.txt git still 
ignores it...

Any idea what I am doing wrong?

I tried all of the following combinations but still with the same result:
!/db/data/load/base/bootstraponly
!/db/data/load/base/bootstraponly/
!/db/data/load/base/bootstraponly/*
!/db/data/load/base/bootstraponly/**

When I add just "!/db" to exclude then it works. But that's not what I want - 
I really want to include just the /db/data/load/base/bootstraponly and its
all content...

Thank you,
Martin

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2015-03-24 20:54 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-20 10:36 Git ignore help mdconf
2015-03-22  3:33 ` Eric Sunshine
2015-03-24  1:00   ` Duy Nguyen
2015-03-24  1:55     ` Eric Sunshine
2015-03-24  9:39       ` Duy Nguyen
2015-03-24 12:46         ` mdconf
2015-03-24 13:11           ` Duy Nguyen
2015-03-24 17:37         ` Eric Sunshine
2015-03-24 20:54           ` Junio C Hamano

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 NNTP newsgroup(s).