3

How to gitignore extension-less files without breaking a global gitignore? This is not a duplicate of How do I add files without dots in them (all extension-less files) to the gitignore file? or gitignore without binary files or similar questions, since none of them addressed the constraint that I want to honor my global gitignore.

Example:

# in $XDG_CONFIG_HOME/git/gitignore
foo.bar
# in /pathto/somegitrepo/.gitignore
*
!/**/
!*.*

With this pattern (that gitignores extension less files such as posix binaries), the global gitignore is effectively rendered useless, so this is not an acceptable solution.

I'm also not interested in workarounds (eg listing all extension-less paths explicitly or using a script to generate the gitignore file or requiring all your binaries to be in some folder).

Note: see also https://public-inbox.org/git/CANri+Ey2o-P+3S9iu1xj5YQooqBxo5Lvom0HdiQDAkSVTRv86A@mail.gmail.com/T/#u for what I'd like gitignore syntax to allow.

timotheecour
  • 3,104
  • 3
  • 26
  • 29

0 Answers0