find path/here -type f -name “*.gitignore”

  • find all files with .gitignore extension inside path/here

find path/here -type f -name “*.gitignore” -delete

  • ditto above + deletes them