Re: the opposite of .gitignore, whitelist

2018-10-26 Thread Jason Cooper
On Fri, Oct 26, 2018 at 01:34:53PM +, Jason Cooper wrote: > On Fri, Oct 26, 2018 at 02:39:26PM +0200, Ævar Arnfjörð Bjarmason wrote: ... > > I thought this was a bug: > > > > ( > > rm -rf /tmp/git && > > git init /tmp/git && > > cd /tmp/git

Re: the opposite of .gitignore, whitelist

2018-10-26 Thread Jason Cooper
On Fri, Oct 26, 2018 at 02:39:26PM +0200, Ævar Arnfjörð Bjarmason wrote: > On Fri, Oct 26 2018, Jeff King wrote: > > On Thu, Oct 25, 2018 at 10:38:46AM -0400, Jason Cooper wrote: > >> On 10/25/18 1:37 AM, Junio C Hamano wrote: > >> > "lhf...@163.com" writes: > >> >> I have a good idea, add a file

Re: the opposite of .gitignore, whitelist

2018-10-26 Thread Rafael Ascensão
One other option is to just use a pattern that matches everything, i.e: echo '*' > .gitignore And take advantage that ignore rules do not apply to tracked files. So instead of using an explicit .gitonly, you add files using: git add -f All files should be ignored except the ones that

Re: the opposite of .gitignore, whitelist

2018-10-26 Thread Ævar Arnfjörð Bjarmason
On Fri, Oct 26 2018, Jeff King wrote: > On Thu, Oct 25, 2018 at 10:38:46AM -0400, Jason Cooper wrote: > >> On 10/25/18 1:37 AM, Junio C Hamano wrote: >> > "lhf...@163.com" writes: >> > >> >> I have a good idea, add a file to git that is the opposite of >> >> .gitignore..., >> > Do negative

Re: the opposite of .gitignore, whitelist

2018-10-26 Thread Jeff King
On Fri, Oct 26, 2018 at 01:31:51PM +0200, Mischa POSLAWSKY wrote: > Jeff King wrote 2018-10-26 5:36 (-0400): > > I think what Junio meant is to ignore everything by default, like: > > > > echo '*' >.gitignore > > > > and then selectively use negative patterns (and being in .gitignore, > >

Re: the opposite of .gitignore, whitelist

2018-10-26 Thread Mischa POSLAWSKY
Jeff King wrote 2018-10-26 5:36 (-0400): > I think what Junio meant is to ignore everything by default, like: > > echo '*' >.gitignore > > and then selectively use negative patterns (and being in .gitignore, > that makes them positive "yes, include this") to add things back: > > echo 'foo'

Re: the opposite of .gitignore, whitelist

2018-10-26 Thread Jeff King
On Thu, Oct 25, 2018 at 10:38:46AM -0400, Jason Cooper wrote: > On 10/25/18 1:37 AM, Junio C Hamano wrote: > > "lhf...@163.com" writes: > > > >> I have a good idea, add a file to git that is the opposite of > >> .gitignore..., > > Do negative patterns in .gitignore file help without inventing >

Re: the opposite of .gitignore, whitelist

2018-10-25 Thread Jason Cooper
Hi all, On 10/25/18 1:37 AM, Junio C Hamano wrote: > "lhf...@163.com" writes: > >> I have a good idea, add a file to git that is the opposite of .gitignore..., > Do negative patterns in .gitignore file help without inventing > anything new? I did this several years ago in an attempt to track

Re: the opposite of .gitignore, whitelist

2018-10-24 Thread Junio C Hamano
"lhf...@163.com" writes: > I have a good idea, add a file to git that is the opposite of .gitignore..., Do negative patterns in .gitignore file help without inventing anything new?

the opposite of .gitignore, whitelist

2018-10-24 Thread lhf...@163.com
I have a good idea, add a file to git that is the opposite of .gitignore, whitelist, the code in the development directory can be submitted to git version control, you can only submit the source code in the src directory, without concern for development tools and operations.System and other