patacongo commented on issue #1363:
URL: 
https://github.com/apache/incubator-nuttx/issues/1363#issuecomment-653775748


   > Is there any .gitignore syntax to undo a higher level .gitignore file? We 
really only need to NOT ignore .asm files in those few low level directories 
where there the .asm files exist. They could be ignored everywhere else (since 
temporary .asm files will be generated for every compiled .c file).
   
   Yes!
   
   _An optional prefix "!" which negates the pattern; any matching file 
excluded by a previous pattern will become included again. It is not possible 
to re-include a file if a parent directory of that file is excluded. Git 
doesn’t list excluded directories for performance reasons, so any patterns on 
contained files have no effect, no matter where they are defined. Put a 
backslash ("\") in front of the first "!" for patterns that begin with a 
literal "!", for example, "\!important!.txt"._
   
   So a solution would be to:
   
   1. Keep the *.asm in the top-level .gitignore.
   2. Add a .gitignore with !*.asm in all directories containing tracked .asm 
files.
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to