Reputation: 41
I'm just getting up to speed with using git. I've been using the examples in https://github.com/Danimoth/gitattributes to put together a gitattributes file for my various projects (mostly bash and python scripts). My problem is that most of my bash scripts have no file extension. Is there a pattern I can use to explicitly select these (e.g. for a filter)? Or would it be easier to rename them with an .sh extension?
Upvotes: 3
Views: 889
Reputation: 701
Perhaps I'm misunderstanding, but it seems like you could work head -n 1 * | grep '#!/bin/bash'
(or equivalent) into some command, couldn't you? Would post as comment, but reputation isn't high enough.
Hopefully I haven't completely misinterpreted your query.
Upvotes: 1