How do you add linux executable files to .gitignore without giving them an explicit extension and without placing them in a specific or /bin directory? Most are named the sa
A way of generating differences against your .gitignore
in one go from all the executable files from current dir:
find . -perm /111 -type f | sed 's#^./##' | sort | diff -u .gitignore -
this generates a diff meaning you don't lose any manual changes to the file. This assumes your .gitignore
file is already sorted. The sed part just strips the leading ./
that find generates.
There's no automatic way to ignore only executable files, so you're always going to have to man-manage the file.