jish / pre-commit

A slightly improved pre-commit hook for git
https://jish.github.io/pre-commit/
Other
796 stars 96 forks source link

How to ignore folders? #187

Closed KurtPreston closed 9 years ago

KurtPreston commented 9 years ago

I keep some JavaScript files in a vendor folder that is committed to git. I would like to avoid linting these files. Is there a way to turn off the pre-commit hooks just for this folder?

jish commented 9 years ago

We don't have anything like that at the moment. You can always bypass the checks when committing to the vendor/ folder using, git commit -n

mpapis commented 9 years ago

but it's good feature request, should not be hard to add, I will look into it

mpapis commented 9 years ago

you can use .git/info/exclude it has the same format as .gitignore => http://stackoverflow.com/a/1753078/497756

mpapis commented 9 years ago

@jish this one is ready, you might want to push pre release version for all the changes we got on master