git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "Ulrich Windl" <Ulrich.Windl@rz.uni-regensburg.de>
To: "Sebastian Staudt" <koraktor@gmail.com>
Cc: <git@vger.kernel.org>
Subject: Antw: Re: Q: Ignore ./foo, but not script/foo
Date: Thu, 19 Jul 2018 13:00:04 +0200	[thread overview]
Message-ID: <5B506F34020000A10002C6C5@gwsmtp1.uni-regensburg.de> (raw)
In-Reply-To: <CA+xP2SZJ0VN0Y7SChAx1a8joVMKMU2R9d0je801i=9SuLicF3w@mail.gmail.com>

>>> Sebastian Staudt <koraktor@gmail.com> schrieb am 19.07.2018 um 09:55 in
Nachricht
<CA+xP2SZJ0VN0Y7SChAx1a8joVMKMU2R9d0je801i=9SuLicF3w@mail.gmail.com>:
> Hello Ulrich,
> 
> if you want to ignore a file in the root of the repository (and only
> there) this is the correct syntax:
> 
>     /foo

Hi!

Thanks, you are perfectly right: It works, and actually, when read carefully enough, the last item in "PATTERN FORMAT" explains that.

Maybe the EXAMPLES could have an example for each item (5 cases) described ;-)

Regards,
Ulrich

> 
> Best regards,
>     Sebastian
> Am Do., 19. Juli 2018 um 09:45 Uhr schrieb Ulrich Windl
> <Ulrich.Windl@rz.uni-regensburg.de>:
>>
>> Hi!
>>
>> I have a (simple) question I could not answer elegantly from the 
> gitignore(5) manual page:
>>
>> A project produces a "foo" binary in the root directory that I want to 
> ignore (So I put "foo" into .gitignore)
>> Unfortunately I found out taht I cannot have a "script/foo" added while 
> "foo" is in .gitignore.
>> So I changed "foo" to "./foo" in .gitignore. I can could add "script/foo", 
> but now "foo" is not ignored any more!
>>
>> Is there as solution other than:?
>> --
>> foo
>> !script/foo
>> !bla/foo
>> #etc.
>> --
>>
>> If "foo" is one exception to generally using foo elsewhere, it seems to be 
> counterproductive to have to add exceptions for all the cases that are not 
> exceptions, while "foo" is the only exception...
>>
>> Did I miss something? If so, maybe add it to a future manual page.
>>
>> Regards,
>> Ulrich
>>
>>





      parent reply	other threads:[~2018-07-19 11:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-19  7:38 Q: Ignore ./foo, but not script/foo Ulrich Windl
2018-07-19  8:01 ` 3Ævar Arnfjörð Bjarmason
2018-07-19  9:06   ` Timothy Rice
2018-07-19  9:22     ` Konstantin Khomoutov
2018-07-19  9:30     ` Ævar Arnfjörð Bjarmason
     [not found] ` <CA+xP2SZJ0VN0Y7SChAx1a8joVMKMU2R9d0je801i=9SuLicF3w@mail.gmail.com>
2018-07-19 11:00   ` Ulrich Windl [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=5B506F34020000A10002C6C5@gwsmtp1.uni-regensburg.de \
    --to=ulrich.windl@rz.uni-regensburg.de \
    --cc=git@vger.kernel.org \
    --cc=koraktor@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).