- Create a new directory.
- Open terminal and navigate to that directory.
- Enter
git init
. - Create a "post-commit" file in
.git/hooks/
. - Inside the file enter the following bash script:
#!/bin/bash
open https://www.ncsu.edu/
exit 0
- Save and exit.
- Give this file executive permission using
chmod +x .git/hooks/post-commit
. - Commit and see the post-commit hook in action!
- Shell script is in file named
post-commit.sh
.
-
Notifications
You must be signed in to change notification settings - Fork 0
gupta-sagar/Git_Hooks
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
Repo to test Git Hooks
Topics
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published