Skip to content

Latest commit

 

History

History
21 lines (17 loc) · 524 Bytes

20210323143404-git_hooks.org

File metadata and controls

21 lines (17 loc) · 524 Bytes

Git hooks

The basics

Git hooks documentation Add executable file to .git/hooks/ named by the hook you want.

post-commit example

.git/hooks/post-commit

#!/bin/sh
git push origin main

Don’t forget to make it executable: chomod +x .git/hooks/post-commit