codeburst

Bursts of code to power through your day. Web Development articles, tutorials, and news.

Follow publication

Understanding Git Hooks

Amit Prajapati
codeburst
Published in
10 min readMay 16, 2020

So what are Git hooks?

Implementing Git Hooks

$ ls .git/hooks/
sample files inside the hooks directory
#!/usr/bin python
#!/bin/bash
#!/bin/sh
$ chmod +x .git/hooks/commit-msg
Bad commit
Good commit
Bypass commit
Commit Rejected
Commit Accepted

What is Husky?

Set up

package.json file creation
Files in my directory

What is JSHint?

Installing jshint and husky package
dependencies
Commit failed by husky
Successfully committed
$ git commit -m ‘SHAME ON ME’ --no-verify

Conclusion

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

Published in codeburst

Bursts of code to power through your day. Web Development articles, tutorials, and news.

No responses yet

Write a response