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