Skip to content

Instantly share code, notes, and snippets.

@farynaio
Created August 31, 2019 13:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save farynaio/f3039cf4a1dcaecda98906fcbe1ba8e3 to your computer and use it in GitHub Desktop.
Save farynaio/f3039cf4a1dcaecda98906fcbe1ba8e3 to your computer and use it in GitHub Desktop.
post-receive hook: push to alternative Github repo
#!/bin/sh
read oldrev newrev refname
prefix="refs/heads/"
branch=${$refname#$prefix}
git push github $branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment