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
Written by Maximilian Weber
Related protips
2 Responses
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
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Git
Authors
khasinski
591.1K
dmichaelavila
500.4K
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#