Skip to content

Instantly share code, notes, and snippets.

@cossio
Created December 21, 2017 21:40
Show Gist options
  • Save cossio/1d15d9779726f1cd1fb1b16708502e60 to your computer and use it in GitHub Desktop.
Save cossio/1d15d9779726f1cd1fb1b16708502e60 to your computer and use it in GitHub Desktop.
git post-commit
#!/bin/sh
git push origin master
@cossio
Copy link
Author

cossio commented Dec 21, 2017

Automatic push changes to a remote after commit. Create a file .git/hooks/post-commit containing this code. And add execution permissions to it, chmod +x post-commit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment