Re: [RFC/PATCH] git-add: Don't exclude explicitly-specified tracked files

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Greg Brockman wrote:

> For example, in my personal usage, when I ignore a directory but track
> some files within it, this is because I don't want to specify an
> ignore for every single other file in that directory.  Also note that
> negated .gitignore entries don't seem to work in this case, i.e. a
> .gitignore with contents
> dir
> !dir/file
> won't actually let file be addable again.

Aside: yeah, this is something I have run into before.  The workaround
I used was to use a dir/.gitignore instead, like this:

 *
 !/file

which is ugly.

Maybe git should get internal support for something like

 dir/**

(meaning “all files under dir”) and “!dir/file” could be internally
munged to

 !/dir
 dir/**
 !dir/file

when it appears after “dir”.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]