From: Patrick Steinhardt <ps@pks.im>
To: Divyaditya Singh <divyadityasnaruka@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: Query about gitignore
Date: Wed, 7 Feb 2024 06:43:36 +0100 [thread overview]
Message-ID: <ZcMYiOxBA-N0NwWT@tanuki> (raw)
In-Reply-To: <B7F364DA-27E7-4BDC-93EE-32E6430B6ACE@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 859 bytes --]
Hi Divyaditya,
On Wed, Feb 07, 2024 at 01:56:34AM +0530, Divyaditya Singh wrote:
> Hello there,
>
> I hope you are having a wonderful day.
>
> I apologize if this is inappropriate but I wanted to ask is there a
> way that I can make my .gitignore such that it ignores the entire
> parent directory of a matching file.
Not inappropriate at all!
Rephrasing what you say, you basically want to ignore "dir/" if and only
if "dir/a" exists and matches a specific pattern in your gitignore,
right? If so, this is not something that you can currently achieve with
gitignores.
Would you mind maybe explaining your particular usecase a bit more? This
_could_ help to find a different solution for you. But even if there is
none it might motivate others to think about possible ways to implement
this in Git if there is interest.
Patrick
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2024-02-07 5:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-06 20:26 Query about gitignore Divyaditya Singh
2024-02-07 5:43 ` Patrick Steinhardt [this message]
[not found] ` <7CEEE27C-6B5D-4DC2-B9EA-549185D7AB5C@gmail.com>
[not found] ` <A0502A2F-970B-46F3-B216-E82B2258DF3A@gmail.com>
2024-03-04 9:51 ` Patrick Steinhardt
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=ZcMYiOxBA-N0NwWT@tanuki \
--to=ps@pks.im \
--cc=divyadityasnaruka@gmail.com \
--cc=git@vger.kernel.org \
/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.