From: Karsten Blees <karsten.blees@gmail.com>
To: pclouds@gmail.com, alljeep@gmail.com
Cc: Git List <git@vger.kernel.org>
Subject: Re: Feature Request: gitignore recursion
Date: Thu, 10 Oct 2013 09:59:13 +0200 [thread overview]
Message-ID: <52565E51.7050401@gmail.com> (raw)
In-Reply-To: <CACsJy8CHcyDrzieX1Ps3LU2UxCP+QJdv9+5BXZj9Mw2bMs5v3w@mail.gmail.com>
> On Mon, Oct 7, 2013 at 5:23 AM, AJ <allj...@gmail.com> wrote:
>> I'm hoping to get the following feature implemented into git.
>>
>> Add the ability to recursively include using:
>> !/my_dir/**/*
>
>
> You can do that since v1.8.2. Actually the pattern should be
>
> !/my_dir/**
>
Another solution to include just one specific directory:
/*
!/wp-content
/wp-content/*
!/wp-content/themes
Note the "/*", instead of "*" which matches everything everywhere.
> Checkout gitignore man page for more information.
>
The compiled version reads like this:
"A trailing "/" matches everything inside. For example, "abc/" matches all files inside directory "abc"..."
--- 8< ---
Subject: [PATCH] gitignore.txt: fix documentation of "**" patterns
"**" means bold in ASCIIDOC, so we need to escape it.
Signed-off-by: Karsten Blees <blees@dcon.de>
---
Documentation/gitignore.txt | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/Documentation/gitignore.txt b/Documentation/gitignore.txt
index 54e334e..f971960 100644
--- a/Documentation/gitignore.txt
+++ b/Documentation/gitignore.txt
@@ -113,12 +113,12 @@ full pathname may have special meaning:
- A leading "`**`" followed by a slash means match in all
directories. For example, "`**/foo`" matches file or directory
- "`foo`" anywhere, the same as pattern "`foo`". "**/foo/bar"
+ "`foo`" anywhere, the same as pattern "`foo`". "`**/foo/bar`"
matches file or directory "`bar`" anywhere that is directly
under directory "`foo`".
- - A trailing "/**" matches everything inside. For example,
- "abc/**" matches all files inside directory "abc", relative
+ - A trailing "`/**`" matches everything inside. For example,
+ "`abc/**`" matches all files inside directory "`abc`", relative
to the location of the `.gitignore` file, with infinite depth.
- A slash followed by two consecutive asterisks then a slash
--
1.8.4.msysgit.1
prev parent reply other threads:[~2013-10-10 7:59 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-06 22:23 Feature Request: gitignore recursion AJ
2013-10-07 10:26 ` Duy Nguyen
2013-10-07 11:24 ` Jeff King
2013-10-07 13:41 ` Duy Nguyen
2013-10-10 7:59 ` Karsten Blees
2013-10-10 16:22 ` Jeff King
2013-10-10 7:59 ` Karsten Blees [this message]
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=52565E51.7050401@gmail.com \
--to=karsten.blees@gmail.com \
--cc=alljeep@gmail.com \
--cc=git@vger.kernel.org \
--cc=pclouds@gmail.com \
/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).