Last Updated: February 25, 2016
·
634
· wbrmx

push automatically on commit

just create a file named

post-commit

under

.git/hooks

fill it with

#!/bin/sh
git push

and make it executable

chmod +x .git/hooks/post-commit

2 Responses
Add your response

It also needs to be executable.

chmod +x .git/hooks/post-commit

Although tbh I'm not sure this is a great idea.

over 1 year ago ·

Thx for the chmod +x hint.
I like to have it for my private repos...

over 1 year ago ·