Thread (1 message) 1 message, 1 author, 2018-07-19

Antw: Re: Q: Ignore ./foo, but not script/foo

From: Ulrich Windl <hidden>
Date: 2018-07-19 11:00:09

quoted
quoted
Sebastian Staudt [off-list ref] schrieb am 19.07.2018 um 09:55 in
Nachricht
[off-list ref]:
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
[off-list ref]:
quoted
Hi!

I have a (simple) question I could not answer elegantly from the 
gitignore(5) manual page:
quoted
A project produces a "foo" binary in the root directory that I want to 
ignore (So I put "foo" into .gitignore)
quoted
Unfortunately I found out taht I cannot have a "script/foo" added while 
"foo" is in .gitignore.
quoted
So I changed "foo" to "./foo" in .gitignore. I can could add "script/foo", 
but now "foo" is not ignored any more!
quoted
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...
quoted
Did I miss something? If so, maybe add it to a future manual page.

Regards,
Ulrich


Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help