Skip to content

Instantly share code, notes, and snippets.

@mgurov
Created June 8, 2015 21:15
Show Gist options
  • Save mgurov/93062e3afaad5d09f0b2 to your computer and use it in GitHub Desktop.
Save mgurov/93062e3afaad5d09f0b2 to your computer and use it in GitHub Desktop.
.git/hooks/post-commit: sync remote automatically
#!/bin/sh
if git remote | grep autosync > /dev/null; then
for remote in $(git remote | grep autosync); do
git push $remote --all -f
done
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment